[pstricks] [pst-calculate] Is there a fix to process the number whose fraction part excess 9 digits?

廖雄飞 liaofei1128 at 163.com
Sat Oct 19 13:49:16 CEST 2019


When I use \pscalculate to do some arithmetic operation, sometimes \pscalculate results a lot of fraction digits more than nine(e.g. 360/7=51.42857142857143),  at this time latex will report the error message "! number too big."


This issue had been reported in here about two years ago:
https://tex.stackexchange.com/questions/387526/error-number-too-big-argument-10000000149011612
But I didn't see any effective solution on this issue. 


According to the manual of pst-calculate, \pscalculate provides any option to tune up,  
but we can set the round-precision for \psCalculate, after some tests, I found it can't work well with \pnode, or \uput either.


\documentclass{article}
\usepackage{pst-node}
\usepackage{pst-calculate}
\begin{document}
\begin{pspicture}[showgrid](-4,-3.3)(4,3)
\SpecialCoor
\pscalculate{360/7} % latex prints out 51.42857142857143
\psCalculate[round-mode=places,round-precision=3]{360/7} % latex prints out 51.429
\pnode(1;\pscalculate{180/5}){A} % latex works well
\pnode(1;\pscalculate{18/7}){B} % latex output the error message "! number too big."
\pnode(1;\pscalculate{180/7}){C} % latex output the error message "! number too big."
\uput[45](1,\pscalculate{18/7}){D} % latex works well at this time, why?
\uput[90](1,\psCalculate{18/7}){E} % Argument of \pst@@@@@checknum has an extra }.
\pnode(1;\psCalculate{360/7}){F} %! Use of \pnode@ doesn't match its definition.
\pnode(1;\psCalculate[round-mode=places,round-precision=3]{360/7}){G} %! Use of \pnode@ doesn't match its definition.
%\@ifnextchar ... \reserved at d =#1\def \reserved at a {
%                                                  #2}\def \reserved at b {#3}\f...
%l.9 ...-mode=places,round-precision=3]{360/7}}){A}
\end{pspicture}
\end{document}


Does/How pstricks or the fp package truncate the digits excess nine in the fraction part automated? 
Any suggestion well be appreciated, thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pstricks/attachments/20191019/31bf08f1/attachment.html>


More information about the PSTricks mailing list