diff --git a/LICENSE b/LICENSE index d1534e6cb..5965a0b2c 100644 --- a/LICENSE +++ b/LICENSE @@ -207,28 +207,6 @@ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* Cephes - -Copyright (c) 1984-2000 Stephen L. Moshier - -Some software in this archive may be from the book _Methods and Programs for -Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) -or from the Cephes Mathematical Library, a commercial product. In either event, -it is copyrighted by the author. What you see here may be used freely but it -comes with no support or guarantee. - -Stephen L. Moshier -moshier@na-net.ornl.gov - -* FreeBSD - -Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - * Go Copyright (c) 2009 The Go Authors. All rights reserved. @@ -259,6 +237,28 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* Cephes + +Copyright (c) 1984-2000 Stephen L. Moshier + +Some software in this archive may be from the book _Methods and Programs for +Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) +or from the Cephes Mathematical Library, a commercial product. In either event, +it is copyrighted by the author. What you see here may be used freely but it +comes with no support or guarantee. + +Stephen L. Moshier +moshier@na-net.ornl.gov + +* FreeBSD + +Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. + * Faddeeva Copyright (c) 2012 Massachusetts Institute of Technology @@ -282,13 +282,18 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. +* SLATEC Common Mathematical Library + +Public domain. + +* FDLIBM + +Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -320,11 +325,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -* SLATEC Common Mathematical Library - -Public domain. - -* FDLIBM - -Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. - diff --git a/base/assert/is-nonnegative-finite/README.md b/base/assert/is-nonnegative-finite/README.md index 889595f7d..f2dc444ef 100644 --- a/base/assert/is-nonnegative-finite/README.md +++ b/base/assert/is-nonnegative-finite/README.md @@ -84,6 +84,97 @@ bool = isNonNegativeFinite( NaN ); + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/assert/is_nonnegative_finite.h" +``` + +#### stdlib_base_is_nonnegative_finite( x ) + +Tests if a numeric value is a nonnegative finite number. + +```c +#include + +bool out = stdlib_base_is_nonnegative_finite( 3.14 ); +// returns true + +out = stdlib_base_is_nonnegative_finite( -2.0 ); +// returns false +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. + +```c +bool stdlib_base_is_nonnegative_finite( const double x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/assert/is_nonnegative_finite.h" +#include +#include + +int main( void ) { + const double x[] = { 5.0, -5.0, 3.14, -3.14, 0.0, 0.0/0.0 }; + + bool b; + int i; + for ( i = 0; i < 6; i++ ) { + b = stdlib_base_is_nonnegative_finite( x[ i ] ); + printf( "Value: %lf. Is nonnegative finite? %s.\n", x[ i ], ( b ) ? "True" : "False" ); + } +} +``` + +
+ + + +
+ + +