ieee754 by yt

{$r-}type a=array[0..9]of byte;p=^a;var c:char;r:extended;s:single;d:double;x:p;i:word;const h='0123456789abcdef';begin
repeat
read(c);if i=0then i:=ord(c);if c=' 'then
begin
readln(r);
s:=r;d:=r;x:=p(@r);if i=115then
begin i:=3;x:=p(@s)end;if i=100then
begin i:=7;x:=p(@d)end;if i=101then
begin i:=x^[0];inc(x^[0],3*ord(i=16)+2*ord((i=$98)or(i=50))+ord(i in[$80..$c0]));i:=9 end;for i:=i downto 0do
begin write(h[x^[i]div 16+1],h[x^[i]mod 16+1])end;writeln;end;until 0=1 end.

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page