Sunday, 18 August 2013

mod() function in PGF/TikZ has strange behavior for negative values

mod() function in PGF/TikZ has strange behavior for negative values

It seems that the mod() function in PGF/TikZ has problems with negative
values. The code
\draw [domain=-5:5, samples=100] plot (\x, {exp(mod(\x+1,2)-1)-1.5431});
will produce this:

Any ideas?

No comments:

Post a Comment