Page 1 of 1
[Implemented] Doubles
Posted: Tue Jan 29, 2002 4:08 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.
Hey Fred,
When are we going to get accurate Floats... or Doubles ??
(and a Printer library?)
Edited by - paul on 29 January 2002 16:09:13
Posted: Tue Jan 29, 2002 5:56 pm
by BackupUser
Restored from previous forum. Originally posted by fred.
Since v2.90, you should get better accuracy on floats.
Your example
a=5.1
b=6.3
c = a+b returns 11.4.
About double, may be for the 3.0
Bye,
Fred - AlphaSND
Posted: Tue Jan 29, 2002 6:38 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.
Take a look at this Fred...
a.f=39.43
b.f=36.95
c.f=35.57
d.f=35.07
e.f=29.90
total.f=a+b+c+d+e
MessageRequester("Right",StrF(total,2),0)
total.f=39.43+36.95+35.57+35.07+29.90
MessageRequester("Wrong",StrF(total,2),0)
Posted: Tue Jan 29, 2002 7:39 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
This has also the wrong result:
MessageRequester("Wrong",StrF(39.43+36.95+35.57+35.07+29.90,2),0)
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Posted: Tue Jan 29, 2002 7:41 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.
Take a look at this Fred...
a.f=39.43
b.f=36.95
c.f=35.57
d.f=35.07
e.f=29.90
total.f=a+b+c+d+e
MessageRequester("Right",StrF(total,2),0)
total.f=39.43+36.95+35.57+35.07+29.90
MessageRequester("Wrong",StrF(total,2),0)
And this other...
Code: Select all
OpenConsole()
a.f=6.31
b.f=4.22
PrintN(StrF(a*b,2))
a$=Input()
The exact result is=26.6282
Then if the precision is to 2 decimals, the correct result is: 26.63
Manolo
Posted: Tue Jan 29, 2002 7:47 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.
Code: Select all
OpenConsole()
a.f=6.31
b.f=4.22
PrintN(StrF(a*b,2))
a$=Input()
The exact result is=26.6282
Then if the precision is to 2 decimals, the correct result is: 26.63
Manolo
[/quote]
a.f=6.31
b.f=4.22
PrintN(StrF(a*b,0))----> result with 0 decimals
Sniffffff. Result is: 26 (No rounded to superior) result correct: 27
Manolo
Posted: Tue Jan 29, 2002 10:29 pm
by BackupUser
Restored from previous forum. Originally posted by fred.
Yes, float have very poor precision. It's the same in C or C++.. I will try to add double asap.
Fred - AlphaSND
Posted: Fri Apr 05, 2002 9:39 am
by BackupUser
Restored from previous forum. Originally posted by Manolo.
Since v2.90, you should get better accuracy on floats.
Your example
a=5.1
b=6.3
c = a+b returns 11.4.
About double, may be for the 3.0
Bye,
Fred - AlphaSND
Fred,
Promise forgot
Sorry
Manolo
Posted: Fri Apr 05, 2002 9:46 am
by BackupUser
Restored from previous forum. Originally posted by fred.
may be = not sure.
Fred - AlphaSND
Posted: Fri Apr 05, 2002 10:49 am
by BackupUser
Restored from previous forum. Originally posted by Manolo.
may be = not sure.
Fred - AlphaSND
Ok Fred,
I can wait another bit of time.
But, please, remember that this is very important for you star product.
Hapy weekend.
Manolo
Posted: Sat Apr 06, 2002 2:08 pm
by BackupUser
Restored from previous forum. Originally posted by GorkaTRON.
may be = not sure.
Fred - AlphaSND
Ok Fred,
I can wait another bit of time.
But, please, remember that this is very important for you star product.
Hapy weekend.
Manolo
(Lo siento Manolo por el plagio)
Oops. I don't know post new messages...
When will Doubles be available? I think it's very important for a good compiler Double support and it's very necessary for technical software, I use PureBasic for scientific programs and I don't have enough resolution with floats. I hope doubles will be available on 3.1 version.
^^GorkaTRON^^
Posted: Sun Apr 14, 2002 10:42 pm
by BackupUser
Restored from previous forum. Originally posted by nico.
Yeah Fred , PLEASE do!
I also need it BADLY!!!
Im making a euro calculator, and i have to work with numbers like 2.20371
Please , if those doubles are the solution of beeing able to work/calculate
with more numbers behind the comma/point , then please make it if possible!
Nico
- = Registered Purebasic User = -
Posted: Sun Apr 14, 2002 10:46 pm
by BackupUser
Restored from previous forum. Originally posted by nico.
Yes, float have very poor precision. It's the same in C or C++.. I will try to add double asap.
Fred - AlphaSND
Please Fred... Please ....!