Help for this page

Select Code to Download


  1. or download this
    /* Need -0.0 for SvNVX to preserve IEEE FP "negative zero" because
       +0.0 + -0.0 => +0.0 but -0.0 + -0.0 => -0.0 */
    #  define SvIVX(sv) (0 + ((XPVIV*) SvANY(sv))->xiv_iv)
    #  define SvUVX(sv) (0 + ((XPVUV*) SvANY(sv))->xuv_uv)
    #  define SvNVX(sv) (-0.0 + ((XPVNV*) SvANY(sv))->xnv_u.xnv_nv)
    
  2. or download this
    #ifdef __GNUC__
            /* to work round a gcc/x86 bug; don't use SvNV */
    ...
    #else
            anv.nv = SvNV(fromstr);
    #endif
    
  3. or download this
    Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags)
    {
    ...
            mg_get(sv);
        if (SvNOKp(sv))
            return SvNVX(sv);
    
  4. or download this
    #! perl -slw
    use strict; use Config;
    ...
    
    print doubleToHex( $snan );