Talk:Giuga numbers: Difference between revisions

Content added Content deleted
(Replied to Rdm.)
Line 29: Line 29:
::But I'm having problems reading that code. Specifically: <code>for(i=1,(length(f)+1)\2,h=f[i]</code> -- I haven't been able to find any documentation on what <code>\2</code> means in this context. Do you know where I should be looking? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 13:00, 14 July 2022 (UTC)
::But I'm having problems reading that code. Specifically: <code>for(i=1,(length(f)+1)\2,h=f[i]</code> -- I haven't been able to find any documentation on what <code>\2</code> means in this context. Do you know where I should be looking? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 13:00, 14 July 2022 (UTC)


:::I don't know why Pari-GP always seems to be written in this Code Golf fashion which makes it very difficult for simple folk such as me to understand. However, I can tell you that '\' is the Euclidean quotient operator which (in effect) rounds the result of the division to the lower integer. See [https://pari.math.u-bordeaux.fr/dochtml/html/Standard_monadic_or_dyadic_operators.html here]. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 13:23, 14 July 2022 (UTC)
:::I don't know why Pari-GP always seems to be written in this Code Golf fashion which makes it very difficult for simple folk such as me to understand. However, I can tell you that '\' is the Euclidean quotient operator which (in effect) rounds the result of the division to the lower integer towards zero. See [https://pari.math.u-bordeaux.fr/dochtml/html/Standard_monadic_or_dyadic_operators.html here]. Confusingly, it's also the line continuation token --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 13:23, 14 July 2022 (UTC)