MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Unevaluated functions


Thanks Albert and Bob,

To give an example, the multiplicative inverse of 3 computed with

PowerMod[3, -1, 288]

does not evaluate and prints the message:

PowerMod::ninv:3 is not invertible modulo 288

Following your suggestions I tried:

PowerMod[___] := "N/A";

but it does not work unless you unprotect the symbol (a bad idea)

Attributes[PowerMod]
= {Listable, Protected, ReadProtected}

So I searched through the docs and found:

Check[PowerMod[3, -1, 288], "N/A"]

which still prints the error message (can be suppressed with Quiet)
but "returns" N/A as desired :)

Thanks!



  • Prev by Date: Experimental`NumericalFunction::dimsl
  • Next by Date: Re: Adding the elements of a list sequentially
  • Previous by thread: Re: Unevaluated functions
  • Next by thread: Re: Unevaluated functions