High, I need to test my arbitrary precision calculator, and
bc seems like a nice yardstick to compare to, however,
bc does truncate the result of each multiplication to what seems to be the maximum scale of the involved operands each.
Is there a quick way to turn this off or to automatically set the scale of each multiplication to the sum of scales of the factors so that it doesn't lose any precision?
If you have a more elegant solution to this involving something other than
bc, I would appreciate your sharing it.
$ bc <<< '1.5 * 1.5' 2.2
The real answer is 2.25.