Here is another method I wrote where you compute in the Q[√5] field. It can be modified to work over Z[√5] as well:<p><a href="http:&#x2F;&#x2F;ideone.com&#x2F;NWQe38" rel="nofollow">http:&#x2F;&#x2F;ideone.com&#x2F;NWQe38</a>