January 2nd, 2020

  • shlomif

Tech Tip: Implementing assert() in PARI/GP

One can implement assert() in PARI-GP, a GPLed computer algebra system, using the error() function:

assert(myfunc()==5,"myfunc should return 5")


Copyright by Shlomi Fish, 2020.

You can reuse this entry under the Creative Commons Attribution 4.0 Unported licence, or at your option any later version of it. See the instructions on how to comply with it.

Whatever code given here is provided under the MIT / Expat licence.

  • Current Music
    George Harrison - I've got my mind set on you