|
![](/i/fill.gif) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> John VanSickle wrote:
>>>
>>>> John VanSickle wrote:
>>>>
>>>>> Jellby wrote:
>>>>>
>>>>>> #declare X=Rmin*sqrt(1-Rmaj*Rmaj/(Rmin*Rmin));
>>>>> Why not X=sqrt(Rmin*Rmin-Rmaj*Rmaj) ?
>>>> Because Jellby's version gives more precision? ;)
>>> Well, it probably doesn't, but thanks for trying!
>>>
> Actually, it does! (Although I'll admit, only in some very specific
> and unusual cases)
>
BTW, it is even better to write:
#declare X=Rmin*sqrt(1-(Rmaj/Rmin)*(Rmaj/Rmin));
This avoids a potential overflow if Rmin*Rmin is too large to be
represented with a double on the used machine...
Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
| mailto:jeb### [at] free fr | ICQ: 238062172 |
| http://jeberger.free.fr/ | Jabber: jeb### [at] jabber fr |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFO+Gwd0kWM4JG3k8RAj6HAJ4lf+HW/evvbA6iyij90u0T0WY99QCfYSON
9dDt0F3FSMXP563R3frvydc=
=uhLT
-----END PGP SIGNATURE-----
Post a reply to this message
|
![](/i/fill.gif) |