View Single Post
  #11   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
Jasen Betts[_2_] Jasen Betts[_2_] is offline
external usenet poster
 
Posts: 331
Default "Algebraic" IF Statement Evaluation

On 2009-05-19, Jim Thompson wrote:
I need to evaluate...

IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)

BUT I have no IF statement handling capability at this level of a
simulation.

I do have algebraic capability.

Is there some cute way to do this algebraically?

...Jim Thompson


are there any operators or functions that can give a different
mumeric result depending on the truth of the input.

many systems have false as 0 and true as 1 (or less common -1)



else maybe something like (sgn( sgn(V11-7) *2 +1 ) + 1 ) /2