Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - Floating Point Number (#inf,#NAN,#maxval,#minval, constants and function)

Author
Message
Neuro Fuzzy
16
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 22nd Jan 2011 13:08
Say you have a function that keeps returning #inf, and you want to check if this happens. Just say if it equals these constants!




Say you have a float, a, it is a number if:
a<>FLOAT_PINF, a<>FLOAT_NINF, and FLOAT_NAN(a)=0

this uses memblock number one, because it seems bitwise operators only work on integers and dwords?

Login to post a reply

Server time is: 2024-04-19 03:43:36
Your offset time is: 2024-04-19 03:43:36