# How to make the output of ScientificForm computable

I am trying to extract the mantissas of a list of numbers using the ScientificForm and then do some operation on them. However, it seems that the output does not act like a number and is not computable (this is also noted in the documentation). I was wondering if there is a workaround for this?

Here is an example:

list = ScientificForm[#, NumberFormat -> (#1 &)] & /@ {12.34,23.45,345.6}


Then Total@list returns 1.234 + 2.345 + 3.456 without computing the sum.

• @Nasser Could you elaborate? How would you get the mantissas? Feb 28, 2023 at 13:11
• MantissaExponent /@ {12.34, 23.45, 345.6} ?
– Syed
Feb 28, 2023 at 13:16
• @Syed Thanks, I didn't know about this function. However, it seems that this gives a mantissa different than that in scientific notation (where it should lie between 1 and 10). Am I right? Feb 28, 2023 at 13:30
• I think that you have asked two questions and yes you are right. The MantissaExponent will give a mantissa between 0 and 1. For addition, this is not useful since all exponents need to be the same before you add the mantissas; which brings us back to square one.
– Syed
Feb 28, 2023 at 13:46
• @Syed yes it's a different question, but I only asked because it was proposed as a solution with a slightly different answer. Thanks for your help, BTW. Feb 28, 2023 at 16:18

What I meant is since you have the original list, why not do the operation on it? Like this (see also comment by Syed above on MantissaExponent)

list1 = {12.34, 23.45, 345.6};
m = Last /@ MantissaExponent /@ list1
list1/10^(m - 1)


Total[%]


list = ScientificForm[#, NumberFormat -> (#1 &)] & /@ list1


And then trying to do Total on the above, which will not work since it has wrappers around them.

• Thanks, this would do the job. It is just a bit cumbersome, especially sinceManitssaExponent works slightly differently than the common scientific notation. Feb 28, 2023 at 13:35
• @Nasser the Total you have calculated is not going to be correct unless all exponents are the same. Then you add the mantissas and multiply.
– Syed
Feb 28, 2023 at 13:48
• @Syed Seems this actually works even for numbers with different exponents. Feb 28, 2023 at 16:21

The general idea is to do computations and display the result using the Form wrapper of choice. Compare the following for instance.

blist = ScientificForm /@ {12.34, 23.45, 345.6}
Total[blist]
Total[blist[[All, 1]]]


so I would say extract the first part.

list = ScientificForm[#, NumberFormat -> (#1 &)][[1]] & /@ {12.34,
23.45, 345.6}


or

list = First@ScientificForm[#, NumberFormat -> (#1 &)] & /@ {12.34,
23.45, 345.6}


If you look at the TreeForm output for individual numbers, it is clear that you need the first part.

2 list


{24.68, 46.9, 691.2}

• This is returning the numbers in the original list themselves. As mentioned in the question, I want to extract the mantissa. Can this be modified to do that? Feb 28, 2023 at 13:09
• The Total [ blist [[All,1]] ] is still returning the sum of the original numbers, not just the mantissas. Feb 28, 2023 at 16:17