Comments (3)
But nanV is not 0. So it can't be false.
from basic.
"But nanV is not 0" that is right.
But the comparison with NaN has to be false by definition.
See the examples below.
Comparison with NaN
A comparison with a NaN always returns an unordered result even when comparing with itself. The
comparison predicates are either signaling or non-signaling on quiet NaN operands; the signaling
versions signal the invalid operation exception for such comparisons. The equality and inequality
predicates are non-signaling so x = x returning false can be used to test if x is a quiet NaN. The other
standard comparison predicates are all signaling if they receive a NaN operand, the standard also
provides non-signaling versions of these other predicates. The predicate isNaN(x) determines if a value
is a NaN and never signals an exception, even if x is a signaling NaN.
Comparison between NaN and any floating-point value x (including NaN and ±∞)
Comparison NaN ≥ x NaN ≤ x NaN > x NaN < x NaN = x NaN ≠ x
Result Always False Always False Always False Always False Always False Always True
See also
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_intro.html#110
But nanV is not 0. So it can't be false.
Thank you very much!
Yes, I have to extend the loop commands.
IF nanV then ?"true" else ?"false"
works like a charm now.
IF nanV = nanV then ?"true" else ?"false"
and
IF nanV = !nanV then ?"true" else ?"false"
returns false as expected, but
IF !nanV = nanV then ?"true" else ?"false"
returns true. So sad!
Any ideas?
from basic.
OK, found a solution now.
from basic.
Related Issues (20)
- instanceof Fails HOT 2
- Assets with a folder structure are not readable directly
- SENSORS.LIST names not all 20 standard sensor types.
- VOLKEYS.ON / VOLKEYS.OFF
- STT.RESULTS list variable is not reset at program start
- GR.CAMERA. _ _ _SHOOT The file name extension from "image.png" is wrong in a case of jpeg compression
- BYTE.WRITE.BUFFER is very slow
- The Editor stops until REPLACE ALL in Search is used with empty search string
- ROUND Input of NaN (Not a Number) Value returns 0.0 or crashes if the scale is specified. HOT 1
- USING$ Input of a NaN (Not a Number) Value for arguments needing Integer or Long values returns 0 HOT 1
- Some functions return 0.0 or 0 instead of NaN or Infinity HOT 1
- Command Round, double import is to unprecise
- Timer.set <value> -- cannot use a var for <value> HOT 1
- GrabURL reads cache
- On Oreo getting sensor data fails if the returned data array length is lower than three
- [Suggestion] Make the project compatible to Android Studio
- NaN and Infinity issue with gr.arc and gr. modify HOT 1
- Out-of-bound GR.BITMAP.CROP crashes BASIC HOT 1
- User apks without permission crash at startup HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basic.