diff --git a/README.md b/README.md index 19458c3..78c46d9 100644 --- a/README.md +++ b/README.md @@ -350,7 +350,6 @@ This crate offers a set of builtin functions. | `is_finite` | 1 | Numeric | Returns true if the argument is a finite floating-point number, false otherwise | | `is_infinite` | 1 | Numeric | Returns true if the argument is an infinite floating-point number, false otherwise | | `is_normal` | 1 | Numeric | Returns true if the argument is a floating-point number that is neither zero, infinite, subnormal, or NaN, false otherwise | -| `is_subnormal` | 1 | Numeric | Returns true if the argument is a [subnormal](https://en.wikipedia.org/wiki/Subnormal_number) number, false otherwise | | `math::ln` | 1 | Numeric | Returns the natural logarithm of the number | | `math::log` | 2 | Numeric, Numeric | Returns the logarithm of the number with respect to an arbitrary base | | `math::log2` | 1 | Numeric | Returns the base 2 logarithm of the number | diff --git a/src/function/builtin.rs b/src/function/builtin.rs index 3b6d286..95aca35 100644 --- a/src/function/builtin.rs +++ b/src/function/builtin.rs @@ -90,7 +90,6 @@ pub fn builtin_function(identifier: &str) -> Option { "is_finite" => float_is(f64::is_finite), "is_infinite" => float_is(f64::is_infinite), "is_normal" => float_is(f64::is_normal), - "is_subnormal" => float_is(f64::is_subnormal), // Other "min" => Some(Function::new(|argument| { let arguments = argument.as_tuple()?; diff --git a/src/lib.rs b/src/lib.rs index 237483e..0391408 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -331,8 +331,7 @@ //! | `is_nan` | 1 | Numeric | Returns true if the argument is the floating-point value NaN, false otherwise | //! | `is_finite` | 1 | Numeric | Returns true if the argument is a finite floating-point number, false otherwise | //! | `is_infinite` | 1 | Numeric | Returns true if the argument is an infinite floating-point number, false otherwise | -//! | `is_normal` | 1 | Numeric | Returns true if the argument is a floating-point number that is neither zero, infinite, subnormal, or NaN, false otherwise | -//! | `is_subnormal` | 1 | Numeric | Returns true if the argument is a [subnormal](https://en.wikipedia.org/wiki/Subnormal_number) number, false otherwise | +//! | `is_normal` | 1 | Numeric | Returns true if the argument is a floating-point number that is neither zero, infinite, [subnormal](https://en.wikipedia.org/wiki/Subnormal_number), or NaN, false otherwise | //! | `math::ln` | 1 | Numeric | Returns the natural logarithm of the number | //! | `math::log` | 2 | Numeric, Numeric | Returns the logarithm of the number with respect to an arbitrary base | //! | `math::log2` | 1 | Numeric | Returns the base 2 logarithm of the number | diff --git a/tests/integration.rs b/tests/integration.rs index 77fc9fe..63850bb 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -373,7 +373,6 @@ fn test_builtin_functions() { assert_eq!(eval("is_normal(1.0/0.0)"), Ok(Value::Boolean(false))); assert_eq!(eval("is_normal(0)"), Ok(Value::Boolean(false))); assert_eq!(eval("is_subnormal(0)"), Ok(Value::Boolean(false))); - assert_eq!(eval("is_subnormal(1.0e-308)"), Ok(Value::Boolean(true))); // Other assert_eq!(eval("min(4.0, 3)"), Ok(Value::Int(3))); assert_eq!(eval("max(4.0, 3)"), Ok(Value::Float(4.0)));