in reply to Re: Decimal to Scientific notation
in thread Decimal to Scientific notation

Same thing, without map:
perl -e 'printf "%.11e\n", 0.99982928833' 9.99829288330e-01

Replies are listed 'Best First'.
Re^3: Decimal to Scientific notation
by karlgoethebier (Abbot) on Mar 24, 2015 at 16:27 UTC

    Yes sure toolic, but:

    karls-mac-mini:monks karl$ perl -e 'map{printf("%.11e\n", $_)} (0.9998 +2928833, 0.99982928832);' 9.99829288330e-01 9.99829288320e-01

    ...if so...;-)

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

      I'd still be inclined to write

      c:\@Work\Perl>perl -wMstrict -le "printf qq{%.11e\n}, $_ for 0.99982928833, 0.99982928832; " 9.99829288330e-001 9.99829288320e-001
      instead ;-)


      Give a man a fish:  <%-(-(-(-<

        "I'd still be inclined to write..."

        Update: Please forget what i wrote below. Thank you very much for your advice. The issues i mentioned have nothing to do with you.

        OK, I surrender. Perhaps not my very best day. Got ignored by LanX in the CB and then bashed by you - too much ;-)

        Best regards, Karl

        «The Crux of the Biscuit is the Apostrophe»