Education Technology

Solution 40230: Python on TI-Nspire CX Family Software gives different answer then TI-Nspire CX II Family Calculator.

Why does Python on TI-Nspire CX Family software give a different answer then the TI-Nspire CX II Family calculator?

When evaluating the same expressions in Python using the math library, different math answers might be observed between TI-Nspire CX Family Software and TI-Nspire CX II Family Calculator. 

This issue is caused by the different math libraries used. The math module in Python uses different algorithms and number representations than the TI-Nspire.

For example:
import math
Software: ValueError: math domain error

To work around the above issue it is suggested to use the eval_function() from the ti_system library to evaluate, this will give the same result on software and calculator.