Hacker News new | ask | show | jobs
by notpushkin 69 days ago
HN formatter ate up the asterisks in your code comments :) To paste code blocks here, prepend each line with 2 or more spaces:

  (* Mathematica Notation, Assume x>0 *)
  If[ x < 10^(-10),  1 + x/2,   (* order x^2 error *)
  If[ x > 10^10,     Sqrt[x],   (* order 1/Sqrt[x] error *)
  (* else *)         Sqrt[x+1] ] ]
  
  (* I guess the If statements take too much time. *)