[pstricks] performing calculations by avoiding fpeval
Michael Sharpe
msharpe at ucsd.edu
Tue Sep 7 07:01:23 CEST 2010
On Sep 6, 2010, at 3:44 PM, mathias legrand wrote:
> In May 2010, Michael was suggesting a piece of code capable of doing calculations within a multido loop as follows:
>
> \newcount\MLcount%
> \multido{\i=0+1}{22}{%
> \multido{\I=0+1}{30}{%
> \MLcount=\I\relax\advance\MLcount\i\relax\multiply\MLcount2\relax \mypsframe{\i}{\the\MLcount}}%
> }%
> }%
>
>
> From my experience, this only works with integers: is this true?
> If yes, how may it be generalized to real numbers?
> Thank you
The multido loops allow a control variable to be a dimension or a real value---see the multido documentation. Be aware of the difficulties of floating point calculations within TeX---it was not designed to do this well.
Michael
More information about the PSTricks
mailing list