This product requires use of a browser that supports JavaScript 1.2, and that you run with scripting enabled.

Knowledge Base

Home > TI-Nspire™ Family of Products > > Solution 40230
Solution 40230: Python on TI-Nspire CX Family Software gives different answer then TI-Nspire CX II Family Calculator.
Type   Question and Answer
Last Updated   01-OCT-2020 16:29:19

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
math.exp(1000000)
Calculator:1.797693134862316e+308
Software: ValueError: math domain error
pow(2,12)
Calculator:1.414213562373096
Software:1.414213562373095

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

Related Categories
Feedback
Is this solution useful in resolving your question or problem ?   No   Yes