componentized/directory

componentized:constants

interface dev

Create custom wasm components that export constant values.

interface f64 componentized:constants/f64@0.2.1-dev

Constants for the f64 floating point type.

Functions

functionradix: func() -> u32

The radix or base of the internal representation of f64. @value 2

functionmantissa-digits: func() -> u32

Number of significant digits in base 2. @value 53

functiondigits: func() -> u32

Approximate number of significant digits in base 10. @value 15

functionepsilon: func() -> f64

Machine epsilon value for f64, the difference between 1.0 and the next larger representable number. @value 2.2204460492503131e-16

functionmin: func() -> f64

Smallest finite f64 value. @value -1.7976931348623157e+308

functionmin-positive: func() -> f64

Smallest positive normal f64 value. @value 2.2250738585072014e-308

functionmax: func() -> f64

Largest finite f64 value. @value 1.7976931348623157e+308

functionmin-exp: func() -> s32

One greater than the minimum possible normal power of 2 exponent. @value -1021

functionmax-exp: func() -> s32

Maximum possible power of 2 exponent. @value 1024

functionmin-n10-exp: func() -> s32

Minimum x for which 10x is normal. @value -307

functionmax-n10-exp: func() -> s32

Maximum x for which 10x is normal. @value 308

functionnan: func() -> f64

Not a Number (NaN). @value nan

functioninfinity: func() -> f64

Infinity (∞). @value inf

functionneg-infinity: func() -> f64

Negative infinity (−∞). @value -inf

WIT

/// Constants for the `f64` floating point type.
interface %f64 {
  /// The radix or base of the internal representation of `f64`.
  /// @value 2
  radix: func() -> u32;

  /// Number of significant digits in base 2.
  /// @value 53
  mantissa-digits: func() -> u32;

  /// Approximate number of significant digits in base 10.
  /// @value 15
  digits: func() -> u32;

  /// Machine epsilon value for `f64`, the difference between `1.0` and the next larger representable number.
  /// @value 2.2204460492503131e-16
  epsilon: func() -> f64;

  /// Smallest finite `f64` value.
  /// @value -1.7976931348623157e+308
  min: func() -> f64;

  /// Smallest positive normal `f64` value.
  /// @value 2.2250738585072014e-308
  min-positive: func() -> f64;

  /// Largest finite `f64` value.
  /// @value 1.7976931348623157e+308
  max: func() -> f64;

  /// One greater than the minimum possible normal power of 2 exponent.
  /// @value -1021
  min-exp: func() -> s32;

  /// Maximum possible power of 2 exponent.
  /// @value 1024
  max-exp: func() -> s32;

  /// Minimum *x* for which 10<sup>*x*</sup> is normal.
  /// @value -307
  min-n10-exp: func() -> s32;

  /// Maximum *x* for which 10<sup>*x*</sup> is normal.
  /// @value 308
  max-n10-exp: func() -> s32;

  /// Not a Number (NaN).
  /// @value nan
  nan: func() -> f64;

  /// Infinity (∞).
  /// @value inf
  infinity: func() -> f64;

  /// Negative infinity (−∞).
  /// @value -inf
  neg-infinity: func() -> f64;
}