Sharp PC-G850 vs. G850VS
|
06-19-2024, 04:39 AM
(This post was last modified: 06-19-2024 12:23 PM by AeeeO.)
Post: #1
|
|||
|
|||
Sharp PC-G850 vs. G850VS
Hi all,
I've been on this forum quite some years ago, but don't remember my username anymore. So I registered anew! I have both the Sharp PC-G850 and the G850VS. Main difference being the much better display on the VS and the auto line numbering in BASIC and C on the latter. TYPEDEF seems to not work on either machine, altough it is printed in the Japanese, the German and the English manual. Now I discovered another difference and possibly a bug in the VS. I ran this tiny C code on both, after getting incorrect results on the VS from a more complicated formula that I couldn't explain: 10 main(){ 20 double a,b,c; 30 scanf("%f",&a); 40 scanf("%f",&b); 50 c=pow(a,b); 60 printf("c=%f",c); 70 } I entered a=10 and b=2. The result on the G850 was c=100.000000 as expected. The result on the G850VS was c=100.148079 Can this be a bug in the VS or am I missing something? If it's a precision problem of the datatypes float, double, long double: why the difference in the two machines? Regards, Alexander |
|||
06-21-2024, 04:32 AM
Post: #2
|
|||
|
|||
RE: Sharp PC-G850 vs. G850VS
As nearly always, the bug was sitting in front of the machine. After I reset both and thus cleared memory, the results were the same on the G850 and the G850VS.
And the available significant digits on the G850 explain my problem with pow in C, I think. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)