in reply to Re: 02.5 == 25 - WTF?
in thread 02.5 == 25 - WTF?

Using Perl to drive moderately high power electronics (400W) does give "smoke testing" a whole other meaning - perhaps closer the the original meaning?

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^3: 02.5 == 25 - WTF?
by syphilis (Archbishop) on Dec 01, 2020 at 04:26 UTC
    It's probably overkill, but I'll give it a plug, anyway:
    C:\>perl -MMath::MPFR -le "print Math::MPFR->new('2.5', 8);" 2.625
    Math::GMPf is another perl module that can convert octal floating point values to decimal.
    Are there any other modules doing that ? (I would expect so, but I haven't checked.)
    I couldn't spot any built-in perl functions that will readily do this.

    Cheers,
    Rob