Force computation on IEEE float/double



I'm checking two different procedures that will eventually be used with regular floating point arithmetic. I need to estimate numerical error arising from floating point arithmetic.

Is there a way to force computation on floating point numbers? Model problem could be error estimation for:

Erf[x] - Erf[x+h]

for small vaues of $h$ and large values of $x$.


Posted 2019-04-28T10:09:59.470

Reputation: 181

4How about if you try setting $MinPrecision = $MachinePrecision; $MaxPrecision = $MachinePrecision; before the computation. Will this do what you want? if you give a MWE and what output you expect, I could try it. You can put the above inside a Block also. – Nasser – 2019-04-28T10:19:51.017

@MichaelE2 that's the whole point here. Sometimes it's more accurate to find this difference directly and sometimes it's better to approximate by series in $h$. I'm trying to investigate when each method is better, so I need both arbitrary precision arithmetic for correct result and floating to check numerical errors. – Radost – 2019-04-28T15:40:39.720

No answers