big variables with a bigger precision

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators: Administrator, Global Moderator

Post Reply
Guest

big variables with a bigger precision

Post by Guest »

I'm searching for very big primes and I need variables with a bigger precision then 16 digits(Double).
A double is a variable from  2,2e-308 to 1,8e308, but when you make a double with more then 16 digits(let's say 23), Qb just rounds the last 7 digits down.
I type:
12345678901234567890123
Qb changes it into:
1,234567890123456 * 10^23 , which means:
12345678901234560000000
see the difference? That's why I need a variable with a bigger precision. How do I make such a thing?

Rincewind
Guest

Re: big variables with a bigger precision

Post by Guest »

compiling your program should do the trick:

http://relsoft.wrq.cjb.net//files/3dfix.bas
Jehovah
Jr. Member
Posts: 24
Joined: Tue Oct 29, 2002 10:54 pm
Location: Boise, Idaho

Re: big variables with a bigger precision

Post by Jehovah »

depending on the way your program works, you could just use two different veriables.
Post Reply