Help for this page

Select Code to Download


  1. or download this
    C:\>perl -le "print 'ok' if 3335.9999999999995 > 3335.999999999999;"
    ok
    
  2. or download this
    C:\>perl -le "print 3335.9999999999995; print 3335.999999999999;"
    3336
    3336
    
  3. or download this
    C:>perl -le "print 'ok' if 3335.9999999999995 + 0.0000000000001 == 333
    +5.9999999999995;"
    ok
    
  4. or download this
    C:\>perl -le "print 3335.9999999999995;"
    3336
    
  5. or download this
    printf "%a", $float;
    or
    printf "%.16e", $float;
    
  6. or download this
    C:\>perl -MMath::MPFR=":mpfr" -le "print nvtoa(2 ** -1074);"
    5e-324
    
    C:\>perl -MMath::MPFR=":mpfr" -le "print nvtoa(sqrt 2.0);"
    1.4142135623730951
    
  7. or download this
    use POSIX qw(strtod);
    $x = strtod('1234e-5');
    
  8. or download this
    $x = 1234e-5;
    
  9. or download this
    use Math::MPFR qw(:mpfr);
    $x = atonv('1234e-5');