LucaMs Expert Licensed User Longtime User Nov 30, 2021 #1 B4X: Dim v As Double ' v = Power(2, 2000) v = 12345678901234567890123456789012345678901234567890 Log(NumberFormat2(v, 1, 2, 2, True))
B4X: Dim v As Double ' v = Power(2, 2000) v = 12345678901234567890123456789012345678901234567890 Log(NumberFormat2(v, 1, 2, 2, True))
Erel B4X founder Staff member Licensed User Longtime User Nov 30, 2021 #2 NumberFormat expects a double value. There is no overflow in this case, though it might not be 100% accurate. Upvote 0
NumberFormat expects a double value. There is no overflow in this case, though it might not be 100% accurate.
LucaMs Expert Licensed User Longtime User Nov 30, 2021 #3 LucaMs said: ' v = Power(2, 2000) Click to expand... LucaMs said: v = 12345678901234567890123456789012345678901234567890 Click to expand... Those two? Upvote 0
LucaMs said: ' v = Power(2, 2000) Click to expand... LucaMs said: v = 12345678901234567890123456789012345678901234567890 Click to expand... Those two?
Erel B4X founder Staff member Licensed User Longtime User Nov 30, 2021 #4 Yes. Try it. The output will be: B4X: 12,345,678,901,234,567,000,000,000,000,000,000,000,000,000,000,000 Upvote 0
Yes. Try it. The output will be: B4X: 12,345,678,901,234,567,000,000,000,000,000,000,000,000,000,000,000
LucaMs Expert Licensed User Longtime User Nov 30, 2021 #5 Erel said: Yes. Try it. The output will be: B4X: 12,345,678,901,234,567,000,000,000,000,000,000,000,000,000,000,000 Click to expand... I should be less concise ? I meant: "How come those assignments don't give an overflow error?" (The NumberFormat2 just served me as a test) Upvote 0
Erel said: Yes. Try it. The output will be: B4X: 12,345,678,901,234,567,000,000,000,000,000,000,000,000,000,000,000 Click to expand... I should be less concise ? I meant: "How come those assignments don't give an overflow error?" (The NumberFormat2 just served me as a test)