1
$\begingroup$

has anybody seen this?

$Version
NumberForm[N@Pi, {10, 6},
 ExponentFunction -> (# &),
 NumberFormat -> (Row[{StringPadLeft[#1, 10, "0"], "E", #3}] &)]

"10.1.0 for Microsoft Windows (64-bit) (March 24, 2015)"

Get::noopen: Cannot open C:\Program Files\Wolfram Research\Mathematica\10.1\SystemFiles\Components\GeneralUtilities\Kernel\64.000000Bit\GeneralUtilities.mx. >>

StringPadLeft[3.141593,10.000000,0]E0

If I invoke StringPadLeft on its own first it works fine

(* fresh kernel*)
StringPadLeft["", 1];
NumberForm[N@Pi, {10, 6},
 ExponentFunction -> (# &),
 NumberFormat -> (Row[{StringPadLeft[#1, 10, "0"], "E", #3}] &)]

003.141593E0

came up while working on this: https://mathematica.stackexchange.com/a/129114/2079

Looking closer we can see the "64" in the system file path and the integer 10 argument to StringPadLeft evidently and bizarrely got my NumberForm applied to them (!??)

Edit: I get the same result on linux (10.1.0 also)

$\endgroup$
5
  • $\begingroup$ I don't reproduce it on "10.4.1 for Linux x86 (64-bit) (April 11, 2016)". $\endgroup$
    – corey979
    Oct 19, 2016 at 15:25
  • $\begingroup$ right you are it is a dup.. $\endgroup$
    – george2079
    Oct 19, 2016 at 17:57
  • $\begingroup$ @george2079 I was intimately familiar with this bug... :) $\endgroup$
    – kale
    Oct 19, 2016 at 17:58
  • $\begingroup$ If its been fixed somebody ought to confirm that on the linked question. $\endgroup$
    – george2079
    Oct 19, 2016 at 18:00
  • $\begingroup$ @george2079 Someone will have to help out on that one. I only have 10.4 available right now and the bug is still present. $\endgroup$
    – kale
    Oct 19, 2016 at 18:03

0

Browse other questions tagged or ask your own question.