3
$\begingroup$

I'm using Mathematica 12.3.

You can use ScientificForm[] to display a number using scientific notation irregardless of its magnitude. When using Around[] this behaviour seems broken. For example:

ScientificForm[0.01]
>> 1.*10^(-2)

ScientificForm@Around[{.01, .02}]
>> 0.015±0.007

The Around still displays in scientific form when numbers are small enough for the default scientific notation to kick in.

Around[{.000001, .000002}]
>> (1.5±0.7)*10^(-6)

Is there a way to still get this working? Is this is a bug?

$\endgroup$

1 Answer 1

5
$\begingroup$

The various *Form functions are wrappers that trigger special display functionality. They are targeted to particular types of expressions. For example, TableForm is intended to be used with List-headed expressions, and it won't have any visible effect on other expressions (although it will still be there as a wrapper).

My guess here is that no display functionality has been implemented for ScientificForm when applied to Around expressions.

You could force the issue:

MapAt[ScientificForm, Around[{.01, .02}], 1]

I don't know what the consequences of that will be if you try to use that modified Around expression in further computations.

In addition, the documentation labels Around as Experimental, so I don't think it's appropriate to report this as a bug.

$\endgroup$
4
  • $\begingroup$ Thanks for the answer and workaround! Note for those who want to use this workaround: it only applies scientific form to the value, not the uncertainty. So it produces slightly different results than expected. $\endgroup$ Commented Apr 22, 2022 at 14:59
  • $\begingroup$ Oh, I assumed that's what would be wanted. You could also just map ScientificForm to everything: ScientificForm /@ Around[{.01, .02}]. $\endgroup$
    – lericr
    Commented Apr 22, 2022 at 15:00
  • $\begingroup$ Ideally I would want it to look like (1.5±0.7)*10^(-6) but it's okay I will just have to do it a little more manually $\endgroup$ Commented Apr 22, 2022 at 15:09
  • $\begingroup$ You could define your own bespoke display function. $\endgroup$
    – lericr
    Commented Apr 22, 2022 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.