FORTRAN format



Hello Vijayendra,

> It prints however, in E format.

Hmm... I see the "d" format in output, not "e".
If I remember correctly, these are distinct:
"e" is for single precision and "d" is for double. 
We want all floats to be printed with "d" since 
Maxima floats are all double precision.

> I have updated  f90.lisp also.

What changes were needed there? I'm just curious.

> Now f90(expression) produces numbers in E format.
> I want to write all the expressions in a file in f90 format.
> I am not very clear how to go about, since the output of
> f90(exp) or fortran(exp) just prints on the screen and
> cannot be accessed. Is there a solution?

I think with_stdout is what you want here.

  with_stdout ("myprogram.f", my_fortran_output_stuff (a, b, c));

When myprogram.f already exists, with_stdout clobbers it.
(At least with clisp and gcl Maxima. It is possible that 
other Lisps do something else.)
So my_fortran_output_stuff needs to output all the stuff
at once, or you'll need to write stuff into separate files
and then paste them together.

For the record I am running Maxima 5.9.1cvs on Clisp 2.33.2
on Linux.

Hope this helps,
Robert Dodier


		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com