How can I convert the number -0.000007 to a string -0.000007?
I tried:
x = -0.000007; ToString[x] That gives an exponential output.
ToString[AccountingForm[N[x, 10], {10, 6}]] gives the value without sign and parentheses around
(0.000007) How can I convert the number -0.000007 to a string -0.000007?
I tried:
x = -0.000007; ToString[x] That gives an exponential output.
ToString[AccountingForm[N[x, 10], {10, 6}]] gives the value without sign and parentheses around
(0.000007) x = -0.000007; str = ToString @ AccountingForm[x, {12, 10}, NumberSigns -> {"-", ""}]; str // FullForm "-0.000007"
ToExpression[str] + 1 0.999993
str // FullForm I get: AccountingForm[-7.`*^-6,List[12,6],Rule[NumberSigns,List["-",""]]] $\endgroup$ ToString $\endgroup$