GPC: longreal, how many bits?

If you're mean how many bits it takes in ram to store longreal,try

writeln('longreal size=',sizeof(longreal)); - as Marco van de Voort

said

If you're interesting,how many SIGNIFICANT bits it contains(how many

precisious)

,this value may vary for different processors(!),

try

var r,t:extended;n:longint;

begin

Writeln('longreal reqres ',sizeof(longreal)*8,' bits of storage');

r:=1.0;

for n:=1 to 255 do

begin

r:=r/2;

t:=r+1;{to prevent "optimisation"!}

if t=1 then begin

Writeln('longreal have ',n,' significant matissa{don''t sure in

grammatics}bits(and have some exponent part bits)');

Break;

end;

end;

end.

I have 80 bits to store and 64 matissa bits.

-main idea is division r by 2 until 1+r will be eqal to 1.

{sometimes it may NEWER be eqal by "fcomp" instruction or

optimisation}

But some instructions is less precise that another,and,this walue is a

maximal precise of addition.Division,log2, etc. have lesser precise.

IMHO,you newer need more precise that real.

No one meansured phisical constants(G,C,e(electron charge),etc) with

this precise)

Regards,

Dmytry Lavrov.

http://dmytrylavrov.narod.ru