Re: problem with 'FortranForm' of Mathematica 3.0
- To: mathgroup at smc.vnet.net
- Subject: [mg17949] Re: problem with 'FortranForm' of Mathematica 3.0
- From: "David Keith" <dkeith at sarif.com>
- Date: Sat, 5 Jun 1999 02:56:12 -0400
- Organization: Hevanet Communications
- References: <7j591c$fuv@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I think it does this because it isn't a Real. It has FullForm:
Times[Rational[1,12],Power[7,Rational[1,2]]]
Using N[] or //N will allow FortranForm to work as you expect:
In[8]:=FortranForm[Sqrt[7]/12]//N
Out[8]//FortranForm=0.2204792759220492
Now, can anyone tell me how to make Outlook Express quit assuuming //
indicates a hyperlink to a file?
Dave
Xiaogang Wang wrote in message <7j591c$fuv at smc.vnet.net>...
> I found Mathematica 3.0's command 'FortranForm' gives bad results!!
>
>Example:
>>FortranForm[Sqrt[7]/12]
>
>Sqrt(7)/11.99999999999999
>
>while Mathematica 2.2.3 gives correct results
>
>How to solve this small 'bug'? Thanks!
>
>Xiaogang Wang
>
>
>