O
Oberon Tony TIGER
Guest
Yes, I did an experiment to get the range of GMS' Reals.
Well, I'd heard that tan(π/2) won't get stuck though, and according to the graph, in tan(x),when x closes to π/2 from the left side, it could lead to a very very BIG number, as big as +infinity.
However, I have a try but the result is quite astonishing - (-22877332). That's not as big as my expectation(it's not small though).
I don't think it's the boundary,since I know that function real(str) could accept the string with format like "1e+n"(n is a number) and will interprete it as a real number 10000...n times ...0. and I've used a number larger like that before.
Now that it could accept the scientific notation, I think it behaves just like a calculator ... in our smartphone?They can hold a real up to (2^1024)-1
Therefore I tried the power(2,16),power(2,32),power(2,64),power(128)... with debugger and no problems. Then I test power(2,1023), it showed a 8.988465e+307, still acceptable.
Then I tried power(2,1024) and just to my assumption , it return an abnormal result: positive infinite.This value is still printable, just like:
This value can also be opposed:
So there I have some questions:
1. Why is there no infinite/-infinite in GMS?
2. Why tan(pi/2) could be a minus value with a not so big absolute?
Well, I just curious about it,but I don't expect a necessary answer.
=========================
Mention in passing : I've reported a bug about keyboard_string and it was ticked was tagged with "SOLVED",but it doesn't solved at all.
Well, I'd heard that tan(π/2) won't get stuck though, and according to the graph, in tan(x),when x closes to π/2 from the left side, it could lead to a very very BIG number, as big as +infinity.
However, I have a try but the result is quite astonishing - (-22877332). That's not as big as my expectation(it's not small though).
I don't think it's the boundary,since I know that function real(str) could accept the string with format like "1e+n"(n is a number) and will interprete it as a real number 10000...n times ...0. and I've used a number larger like that before.
Now that it could accept the scientific notation, I think it behaves just like a calculator ... in our smartphone?They can hold a real up to (2^1024)-1
Therefore I tried the power(2,16),power(2,32),power(2,64),power(128)... with debugger and no problems. Then I test power(2,1023), it showed a 8.988465e+307, still acceptable.
Then I tried power(2,1024) and just to my assumption , it return an abnormal result: positive infinite.This value is still printable, just like:
HTML:
1.<br>
J
HTML:
-1.<br>
J
1. Why is there no infinite/-infinite in GMS?
2. Why tan(pi/2) could be a minus value with a not so big absolute?
Well, I just curious about it,but I don't expect a necessary answer.
=========================
Mention in passing : I've reported a bug about keyboard_string and it was ticked was tagged with "SOLVED",but it doesn't solved at all.