Tag Info

New answers tagged

2

This answer is entirely due to the comment from the ever helpful Daniel Lichtblau. Starting again I split the machine precision and the high precision calculations. The high precision is wrapped in a block that fixes the minimum and maximum precision. I guess that this prevents all exceptions and corrects where the precision drops to a small value. s =.; ...


0

As already noted, due to the large range of variation between the nodes and weights of the Gauss-Laguerre rule, one would usually want to use arbitrary precision evaluation for high orders. In any case, let me present two alternative approaches to generating the nodes and weights for Gauss-Laguerre quadrature. I'll be linking to the papers explaining these ...


7

$MachinePrecision is different from MachinePrecision. The former calls for an arbitrary precision calcluation, done at the same precision as the machine-precision one. The main reason one would want to use this is to enable precision tracking, which is absent for a true machine-precision calculation using MachinePrecision. And, there is your answer. ...


3

It turned out to be, as LLIAMNnYP suggested, a precision issue. The data I had contained values such as (in FullForm) ...


4

The documentation is misleading in this case. The wrapper NumberForm is not transparent to numerical calculation -- it stops it dead. This means you should only apply it to your final calculations when all the numcerical work is done. So the following works. NumberForm[{n1, n2 - n1}, 3] {0.235, 0.766} If what you want is for all the numerical work in ...


0

Say you got a list: a = {1.214132,4.54342,12.2354354} and you want to change the precision on the entire list: SetPrecision[#,4]&/@a result: {1.214, 4.543, 12.24}



Top 50 recent answers are included