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

Herbert Voss Herbert.Voss at fu-berlin.de
Sat Oct 19 16:39:02 CEST 2019


Am 19.10.19 um 13:49 schrieb 廖雄飞:
> 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;\fpeval{18/7,3}){B}

will solve the problem with \usepackage{xfp}

Herbert


> \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!
>
>
>
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> https://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/



More information about the PSTricks mailing list