lazy NaN
#7057
Replies: 3 comments 5 replies
-
Hmm I've just have an idea: a lazy number is |
Beta Was this translation helpful? Give feedback.
4 replies
-
Each number type
which will check if the number is valid (which includes not being a NaN). Could you use this? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Still attempted with no luck. My conclusion is that there's no way without using the double approximation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
For my new R package lazyNumbers I want to be able to deal with
NaN
values.I'm able to create a lazy
NaN
by doinglazyNumber(0) / lazyNumber(0)
. Then I indeed getNaN
when I callas_double
on this lazy number.But how to test whether a lazy number is
NaN
? I could test whether its double approximation isNaN
but this is not a good solution, I don't want to callas_double
everytime.I already deal with missing values by using
std::optional
. So I cannot usestd::optional
for theNaN
values.Beta Was this translation helpful? Give feedback.
All reactions