[pstricks] sqrt function

Mike Chinander mchinand at midway.uchicago.edu
Sun Mar 14 19:34:25 CET 2004


On Sun, 14 Mar 2004, Richard J. Cattien wrote:

> Hi,
> 
> How do i plot the following function.
> 
> 	y = sqrt(x-2)
> 
> I always get an error:
> Error: /rangechek in --sqrt--
> Operand stack:
> 0.0    -2
> 
> I use:
> \psplot[plotpoints=200]{0}{6}{x 2 sub sqrt}
> 
> with add instead of sub everything works fine.
> 
> thanks for every answer!
> 

It doesn't like a negative number as an operand to sqrt.

sqrt(0-2)=sqrt(-2)

--Mike




More information about the PSTricks mailing list