Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site osu-cgrg.UUCP Path: utzoo!watmath!clyde!cbosgd!apr!osu-eddie!osu-cgrg!flip From: flip@osu-cgrg.UUCP (Flip Phillips) Newsgroups: net.micro.amiga Subject: floating point with sun x-compiler Message-ID: <626@osu-cgrg.UUCP> Date: Wed, 26-Feb-86 18:33:48 EST Article-I.D.: osu-cgrg.626 Posted: Wed Feb 26 18:33:48 1986 Date-Received: Fri, 28-Feb-86 07:49:34 EST Distribution: net Organization: Computer Graphics Research Group, Ohio State University Lines: 28 If anyone using the cross compiler system for the sun is having problems with floating point I/O heres the prob: I think... The greenhills compiler compiles EVERY double/float into a FFP number. When passing it to routines it doesnt really convert it into a double as per the way you do things... it really puts a null byte up there with it. So much for calling the SPTieee / SPFieee routines since they return a 32 bit value. The Lattice library for the sun dev. system is compiled with/does floating point conversion to IEEE numbers... 32 bit floats, 64 bit doubles. When, say, printf("%f",val) goes, it expects a double for val in iEEE format. Fine. Even if you convert it with the afore mentioned things it seems that it still gets converted into a FFP type pseudo-double with null byte attached. Bummer. printf's / scanf's conversion routine pukes. So... I came up with a sorta kluge that I'd be willing to share. Respond to me via mail 'causin I dont want to clutter up the already cluttered up net. If any of you other folk have come up with sumpthin, let me know! I really would appreciate it. flip -- Flip Phillips {ucbvax,decvax}!cbosg!osu-cgrg!flip Computer Graphics Research Group, The Ohio State University