Remove is_sumbnormal
This commit is contained in:
parent
2e0ef6ea4c
commit
3c4a429e8d
@ -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 |
|
||||
|
@ -90,7 +90,6 @@ pub fn builtin_function(identifier: &str) -> Option<Function> {
|
||||
"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()?;
|
||||
|
@ -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 |
|
||||
|
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user