From: Tunc Simsek
Subject: Printing floats.
Date: 
Message-ID: <Pine.SOL.4.10.10007081338380.21273-100000@tudor.EECS.Berkeley.EDU>
Regards,

I pipe data to gnuplot from my Lisp, but gnuplot (at least the version I
have) doesn't like the s,d,l exponent markers.  So I tried to use

	(format stream "~e" number)

which works if number is a double-float or  number is a float and
*read-default-float-format* is double-float.  But if number
is a fixnum then the 's' marker appears in the printed 
representation.

I've read that it is possible to specify explicitly the exponent
marker for ~e or ~g, but could not get it to work.  Any ideas?

The best would be to locally mask the float format directives
of FORMAT so that they always print 'e' as the exponent marker.
Any suggestions?  

Thanks,
Tunc

From: Raymond Toy
Subject: Re: Printing floats.
Date: 
Message-ID: <m366qfhnt7.fsf@lorien.users.mindspring.com>
>>>>> "Tunc" == Tunc Simsek <······@tudor.EECS.Berkeley.EDU> writes:


    Tunc> I've read that it is possible to specify explicitly the
    Tunc> exponent marker for ~e or ~g, but could not get it to work.
    Tunc> Any ideas?

Doesn't something like the following work?

(format t "~,,,,,,'ze" 45) 
=> 4.5z+1
(format t "~,,,,,,'ze" 45f0) 
=> 4.5z+1
(format t "~,,,,,,'ze" 45d0) 
=> 4.5z+1

Works fine on CMUCL.

Ray
From: Tunc Simsek
Subject: Re: Printing floats.
Date: 
Message-ID: <Pine.SOL.4.10.10007082334060.22060-100000@tudor.EECS.Berkeley.EDU>
My ignorance, I'd been trying

(format t "~,,,,,,ee" 45)

and

(format t "~,,,,,,#\ee" 45)



On 9 Jul 2000, Raymond Toy wrote:

> >>>>> "Tunc" == Tunc Simsek <······@tudor.EECS.Berkeley.EDU> writes:
> 
> 
>     Tunc> I've read that it is possible to specify explicitly the
>     Tunc> exponent marker for ~e or ~g, but could not get it to work.
>     Tunc> Any ideas?
> 
> Doesn't something like the following work?
> 
> (format t "~,,,,,,'ze" 45) 
> => 4.5z+1
> (format t "~,,,,,,'ze" 45f0) 
> => 4.5z+1
> (format t "~,,,,,,'ze" 45d0) 
> => 4.5z+1
> 
> Works fine on CMUCL.
> 
> Ray
> 
>