From: SourceForge.net <no...@so...> - 2009-03-29 06:46:48
|
Bugs item #2671850, was opened at 2009-03-07 15:34 Message generated for change (Comment added) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2671850&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Share Libraries Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: jstults (jstults) Assigned to: Nobody/Anonymous (nobody) Summary: f90 error with long expression involving exponent Initial Comment: (%i1) load("f90"); (%i2) f90(long_expression_with_exponent); sometimes results in the fortran lines being broken in the middle of an exponent. For example if e**x overlaps the end of a line, it is split like this: e* & *x This makes the gfortran compiler fail, I'm not sure if other compilers accept an exponent being continued across two lines. The work-around is to manually edit the output so it looks like this: e*& &*x which makes gfortran happy, and it compiles away. It would be nice if f90() could be modified so it wouldn't split lines in the middle of exponents, not sure how much work this would be. Thanks for your attention. ---------------------------------------------------------------------- >Comment By: Robert Dodier (robert_dodier) Date: 2009-03-29 00:46 Message: I've committed r.16 share/contrib/f90.lisp which splits long lines to a fixed width and appends the & continuation character. E.g.: foo = yyy**4+4*xxx*yyy**3+28*yyy**3+6*xxx**2*yyy**2+84*xxx*yyy**2& +294*yyy**2+4*xxx**3*yyy+84*xxx**2*yyy+588*xxx*yyy+1372*yyy+xxx**& 4+28*xxx**3+294*xxx**2+1372*xxx+2401 Let me know if that doesn't work. Closing this report as fixed. ---------------------------------------------------------------------- Comment By: jstults (jstults) Date: 2009-03-24 09:02 Message: That would be fine; gfortran is the compiler I usually use. The other is the intel compiler; I'll be away from my workstation with that compiler for a while so I can't test to see if what you've written works for that one. Thanks for your attention to this, I really appreciate the f90() facility in maxima. ---------------------------------------------------------------------- Comment By: Robert Dodier (robert_dodier) Date: 2009-03-23 10:19 Message: Hi, I'm working on this. About line continuations for Fortran 90, it appears there are various forms. Jstults, is it OK with you if the lines have a trailing ampersand and no leading ampersand? Like this: x = a*b*c*d*& *2+y+z Gfortran seems to accept that but there seems to be some variation among compilers and I don't know what's common. Thanks for any information. Robert Dodier ---------------------------------------------------------------------- Comment By: jstults (jstults) Date: 2009-03-07 15:36 Message: Forgot to put the version, I'm using Maxima version 5.16.3 that's packaged with Fedora 10. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2671850&group_id=4933 |