MathGroup Archive 2010

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

Search the Archive

A repair to Real Number comparison so Fateman's examples do not exhibit

(* Here's a fix for Mathematica that makes MY examples work better.
The challenge to you, should you care to accept it, is to find a 
mathematical program that you have been running previously
successfully, that FAILS with this fix.


Less[x_,y_]:= Greater[y,x]

(* two numbers that are close but not equal*)

inSameFuzzBallNE[x_,y_]:=(Head[x]===Real || Head[y]===Real)&&(x!=y)&&

(* that's all.

But here's an optional hack to display all
low-precision numbers in RED *)

PrintShowFuzz[x_] :=
  x /. (r_Real /; (Precision[r] < $LowPrecisionWarningLimit) -> 
Style[InputForm[r], Red])

  • Prev by Date: Re: Ha! a document that FAILS because it is in notebook
  • Next by Date: Using variable name as string AND value ?
  • Previous by thread: Re: Prime Segment Diagram; why the codes run very slowly?
  • Next by thread: Using variable name as string AND value ?