Skip to content

Instantly share code, notes, and snippets.

@StevenSong
Created August 12, 2022 16:27
Show Gist options
  • Save StevenSong/fb236ac56792134fda92be0f9b6bd313 to your computer and use it in GitHub Desktop.
Save StevenSong/fb236ac56792134fda92be0f9b6bd313 to your computer and use it in GitHub Desktop.
A gist demonstrating floating point errors, mostly as a convincing argument why learning systems is important
import tensorflow as tf
b = tf.constant(21306806, dtype=tf.float32)
print((1+b)-b)
print(1+(b-b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment