Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And then you discover that you have a square root in your computation.


Even then it doesn't matter fully. There are some languages with supported data types where you can actually write the equivalent of.

  x = 2
  y = 2
  1.upto 100 do
    x = x ** (1 / 2)
  end
  1.upto 100 do
    x = x ** 2 
  end
  x == y # => true
because it handles the math by only evaluating the operations at the very end.


Which ones? It honestly seems unlikely to me that this would work well in practice.


Good point, but rational numbers aren't closed under power/square root operation :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: