# Tag Info

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

bc can calculate this to an arbitrary number of decimal places, and is installed on most Linux systems: ...

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

I ran it in Python 3.12.1 and the result is -3.7701774498987155. Interestingly, it is now identical to Julia until the very final digits. Seems there was an update to the maths libraries? Seeing as ...
• 121

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

We could use exact arithmetic to compute the correct value. A range of exact numbers $e$ correspond to the same $a=5.0$ representation in float32 IEEE754, plot over this range: You can see that after ...
• 2,585

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

Other answers have explained the results from Python, Julia, Maxima, C, and Mathematica. I'll explain the result you got from ChatGPT. Generally, the way that ChatGPT works is that you ask a question, ...
• 261

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

I thought it would be interesting to see how the number of bits of precision affects the error. I wrote the following using arb, a library for interval arithmetic (and in particular a library that ...

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

Perhaps the reason you are stunned is that you don't understand that what you are asking to calculate is impossible to ever calculate exactly. So if you want the answer to some precision, you need to ...
• 239

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

Intrigued by the answer by Lutz Lehmann, I gave Fortran with the gfortran compiler (version 13.2.0) a spin because for one it wasn't considered by the OP. For two, since 2008 the intrinsic ...
• 171

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

This function, as any similar hill, tent or hat functions, implements the expansion-and-folding scheme. This means that in the most benign interpretation you lose in each iteration one bit from the ...
• 5,974