rgarnett1955 Active Member Licensed User Longtime User Dec 16, 2019 #1 Is there an elegant way of setting a float or double to NaN? I used: B4X: Public Const NaNd = $"$1.2{"The value is not a number!"}"$ As Double But it a bit cumbersome and I just can't remember it, so every time I need it I have to look it up. Best regards Rob
Is there an elegant way of setting a float or double to NaN? I used: B4X: Public Const NaNd = $"$1.2{"The value is not a number!"}"$ As Double But it a bit cumbersome and I just can't remember it, so every time I need it I have to look it up. Best regards Rob
LucasHeer Active Member Licensed User Longtime User Dec 16, 2019 #2 B4X: Dim d As Double = 0/0 If you want to Infinity: B4X: Dim d As Double = 1/0 Upvote 0