Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12010

Triggering on exception conditions

From Lorenz <lorenz.mueller@bluewin.ch>
Newsgroups comp.soft-sys.math.mathematica
Subject Triggering on exception conditions
Date 2012-10-09 04:44 +0000
Message-ID <k50a41$3os$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


Assume I have a statement like
Table[ {Mod[k, h], PowerMod[k, -1, h]}, {k, 1, h - 1}] 
How can I select the elements in the table which fullfill the condition 
PowerMod::ninv: 2 is not invertible modulo xxx

I would like a statement with a form like
If[PowerMod[2, -1, h] == ninv, 1, 0]
but this does not work.

More general how to catch exceptions in calculation for each type of exception condition, eg in this case PowerMod::ninv 

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Triggering on exception conditions Lorenz <lorenz.mueller@bluewin.ch> - 2012-10-09 04:44 +0000
  Re: Triggering on exception conditions awnl <awnl@gmx-topmail.de> - 2012-10-10 05:25 +0000

csiph-web