Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » FP exception vs NaN
Re: Capture division by zero [message #55306 is a reply to message #55304] Wed, 28 October 2020 13:51 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Wed, 28 October 2020 09:24
mirek wrote on Tue, 27 October 2020 20:50
koldo wrote on Tue, 27 October 2020 19:25

What you say is not conceivable for me. In my world a negative square root is the same as a Vector v(2); v[-1] = 2;


Cool, then please fix example/FnGraph.

Mirek


In this case my old Casio calculator prints an error message.



But so does FnGraph, that is the point (well, actually, it does not print the error, just does not render the graph in areas where the function is undefined). But if you activate FP exception, it will crash on it.

Quote:

Edited: Just checked with my daughter's CASIO Graph 35+E. 1/0 prints "Math ERROR. Press EXIT". Really updated, this version even comes with Python.


Sure, because it gets NaN and interprets correctly as error...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dumb bug. Improper use of Null
Next Topic: strange MinGw return
Goto Forum:
  


Current Time: Tue May 07 10:35:25 CEST 2024

Total time taken to generate the page: 0.01654 seconds