[pstricks] apparent postscript-induced crash
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Mon Jan 4 20:19:31 CET 2010
Am 04.01.2010 19:51, schrieb Zbigniew Nitecki:
> I don't understand what is going on here. The following code...
> \parametricplotThreeD(0.1,1){%
> \rt\space cos t mul %
> \rt\space sin t mul %
> 1 t dup mul sub 0.5 exp%
> }
> Error: /undefinedresult in --exp--
> Operand stack:
> 1.0 0.0 -4.76837e-07 0.5
there are some rounding errors. the reason, why you
want to calculate -4.76837e-07^0.5, which is not possible.
\parametricplotThreeD(0.1,1){
\rt\space cos t mul
\rt\space sin t mul
1 t dup mul sub abs 0.5 exp % <-- abs
}
or
\parametricplotThreeD(0.1,0.9999){% 0.9999
\rt\space cos t mul
\rt\space sin t mul
1 t dup mul sub 0.5 exp
}
or
\parametricplotThreeD(0.1,1){
\rt\space cos t mul
\rt\space sin t mul
1 t dup mul sub abs sqrt % is a bit faster
}
Herbert
More information about the PSTricks
mailing list