Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/base/special/rempio2/docs/types/index.d"

Index

Functions

Functions

Export assignment rempio2

  • Computes x - nπ/2 = r.

    Notes

    • The function returns n and stores the remainder r as the two numbers y[0] and y[1], such that y[0] + y[1] = r.
    • For input values larger than 2^20 * π/2 in magnitude, the function only returns the last three binary digits of n and not the full result.

    Parameters

    • x: number

      input value

    • y: Collection

      remainder elements

    Returns number

    factor of π/2

    Example

    var y = [ 0.0, 0.0 ];
    var n = rempio2( 128.0, y );
    // returns 81
    
    var y1 = y[ 0 ];
    // returns ~0.765
    
    var y2 = y[ 1 ];
    // returns ~3.618e-17

    Example

    var y = [ 0.0, 0.0 ];
    var n = rempio2( NaN, y );
    // returns 0
    
    var y1 = y[ 0 ];
    // returns NaN
    
    var y2 = y[ 1 ];
    // returns NaN