atan2 vs mult

Edit on GitHub

atan2 vs mult

Setup

Tests

  • atan2

    var a = 1.0;
    for(var i=1.0; i<1000; i++) {
      a += Math.atan2(i, a);
    }
  • mult

    var a = 1.0;
    for(var i=1.0; i<1000; i++) {
      a += a*a*a*a*a*1e-10;
    }