# Different outputs from two different syntax that should produce the same output

A node A will be constructed by using 2 syntax.

• \pnode(!2 3 0 p2c exch 3 add exch 2 add){A}
• \pnode[3,2](!2 3 0 p2c){A}

Each constructs the node A by translating a point (!2 3 0 p2c) (which is on an basic ellipse) 3 unit rightward and 2 unit upward.

## First Syntax

\pnode(!2 3 0 p2c exch 3 add exch 2 add){A}


And the output is as follows.

\documentclass[pstricks,border=12pt]{standalone}
\pstVerb{/p2c {dup 3 1 roll cos mul 3 1 roll sin mul} bind def}% b a t p2c --> x y
\begin{document}

\begin{pspicture}[showgrid=bottom](6,4)
\pnode(3,2){center}
\pscustom[origin={center},fillstyle=solid,fillcolor=cyan]
{
\psellipticarc(center)(3,2){(A)}{(B)}
\lineto(center)
\closepath
}
\end{pspicture}

\end{document}


## Second Syntax

\pnode[3,2](!2 3 0 p2c){A}


And the output is as follows.

\documentclass[pstricks,border=12pt]{standalone}
\pstVerb{/p2c {dup 3 1 roll cos mul 3 1 roll sin mul} bind def}% b a t p2c --> x y
\begin{document}

\begin{pspicture}[showgrid=bottom](6,4)
\pnode(3,2){center}
\pnode[3,2](!2 3 0 p2c){A}
\pscustom[origin={center},fillstyle=solid,fillcolor=cyan]
{
\psellipticarc(center)(3,2){(A)}{(B)}
\lineto(center)
\closepath
}
\end{pspicture}

\end{document}


Why are the outputs different?

## Edit:

I noticed that the problem will be fixed only if both A and B are expressed in the same syntax, either

    \pnode(!2 3 0 p2c exch 3 add exch 2 add){A}


or

    \pnode[3,2](!2 3 0 p2c){A}
\pnode[3,2](!2 3 0 p2c){B}


But I still don't understand why the output is different for the given examples above (before the Edit section)?

-

For the first example I get the x/y values of A/B:

2.00000048
6.00000048
2.0
5.99999952


and for the second

2.0
5.99999952
2.0
5.99999952

-
+1: Is there a way to globally round any PS calculation to six digits after decimal point? –  stalking is prohibited Jul 7 '13 at 14:44
not with a simple command –  Herbert Jul 7 '13 at 15:00