2

I've noticed that the square function in Tensorflow.js does not give the exact number.

I have a scalar with the value 10450. The square of 10450 is 109,202,500. However, tensorflow calculated the square of 10450 as 109,202,496. 4 points of the true value. Why is that?

const a = tf.scalar(10450).square();
a.print(); // prints 109,202,496
console.log(10450 * 10450); // prints 109,202,500

Explanation?

Cyril
  • 2,783
  • 1
  • 24
  • 35

0 Answers0