|
-
May 15th, 2000, 08:31 PM
#1
Thread Starter
transcendental analytic
Ok, you know all that there are datatypes like integer, single and currency.
While integer (16bit) is spec: -32768...-2,-1,0,1,2...32,767 you can't specify any decimal values like 2.6689 or -6.32
With the Single-precision floating point (32bit) you can specify more exact values, but not too exact, but you will get pretty near a value
With Currency (64bit) you will get an exact value but only give a precision of 10^-4
With Decimal (96bit) you will get the optimal value with 28 digits to both sides of the "," so this one is most exact but still an integer
Ok, we have no true rational-value datatypes, only integers and floating points. My idea was to have a analog data type to specify both rational values like 3/7 and real values like sqr(2) and they will be stored at the same way as varlen strings so that we can calculate exact values for everything.
I got the idea from my TI-83 where I can store and calculate with complex values (not really rational but the i part is there)
Anyone have something to reply? I'm not sure if i'm talking to my self here, i would appreciate comments about my idea.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|