Graph-All: 2D Calculator #4 - Floating Point Inaccuracies

Subscribers:
822
Published on ● Video Link: https://www.youtube.com/watch?v=HQV5J2CjU7w



Duration: 9:50
75 views
3


2022-Feb-10. My brother, Matthew, messed around with another program to plot y^x = x^y and zoomed in to take a look at the floating point inaccuracies:
https://youtube.com/watch?v=G12YsNbjUos&t=1m45s
I thought I would try the same in my own graphing calculator. What you see is a slow zoom into the mysteries of the floating point unit (FPU)'s accuracy. The program is using a 64-bit floating point data type, and the FPU can do some calculations at 80-bit internally. Some of the patterns are mesmerizing, including some phenomenal OPTICAL ILLUSIONS!

0:01 - start zoom on intersection of y=x and inverse graph
0:29 - start to sense floating point inaccuracies
0:33 - disconnection becomes obvious
0:48 - checkerboard
0:56 - grid squares
1:04 - checkerboard
1:07 - grid squares
1:21 - large checkerboard
1:31 - small checkerboard
1:43 - large low-density square lines
2:06 - wavy with large squares
2:19 - squares with checkboards
2:22 - stair step
2:31 - dense wavy
2:40 - diagonal lines with squares
2:43 - wavy with distinct checkerboard
2:51 - wavy gradient
2:54 - wavy with varying shadings
3:03 - squares
3:09 - checkboard with fade out
3:12 - square with diagonal lines
3:18 - gradients
3:31 - large squares with dense diagonal insides
3:46 - squares with varying shades
4:04 - checkboard with gradients
4:12 - diagonal squares with varying shades
4:13 - small checkerboard
4:21 - stars (plus signs)
4:43 - diagonal gray shades in white
4:49 - thin squares in diagonal lines
4:58 - OPTICAL ILLUSION of diagonal lines!
5:10 - stronger OPTICAL ILLUSION, wow!
5:14 - more OPTICAL ILLUSION
5:20 - scrolling to find more OPTICAL ILLUSION
5:26 - x-marked diagonal lines
5:48 - end of OPTICAL ILLUSION
6:03 - thin squares and diagonals
6:10 - cross stitch
6:16 - zig zag squares and diagonals
6:21 - squares with diagonal designs inside
6:24 - large simple squares connected with diagonals
6:27 - gradients via squares and triangles
6:30 - diagonally aligned squares
6:34 - squares with various diagonal gradients - so cool!
6:40 - simple cross stitch
6:47 - triangles connected
6:49 - few simple lines
6:52 - horizontal and vertical lines merge
7:02 - triangles
7:05 - large filled triangle & squares
7:09 - gradient fade
7:14 - squares with clear diagonal coloring
7:15 - more OPTICAL ILLUSIONS!
7:28 - end OPTICAL ILLUSION
7:31 - small tiles
7:33 - inverse gradient fade
7:40 - near square checkerboard with diagonal gradient
8:02 - OPTICAL ILLUSION
8:16 - more checkboard patterns
8:18 - FINAL DETAILS, and zoom
8:33 - maximum zoom about to happen
8:41 - MAXIMUM ZOOM = NOTHINGNESS
8:41 - zoom back out all the way!
9:12 - e = 2.71828 18284 59045 23536 02874 71352 66249 77572 47093 69995 ...


Showcases:
- improvement in the numbering scheme, allowing multiples of 1, 2, 5, then 10 cycles back to the "1" for the next magnitude
- zoom function is very slow just to showcase this floating point inaccuracy
- the meeting point of the y=x line and the inverse line is at (e, e), where e = 2.71828182845904523536028747135266249775724709369995...

Playlists:
--------------------
- Voxel Software 3D: https://youtube.com/watch?v=uadGU-stF-w&list=PLjnbT4UISq0bQF1g85tE9jTrKfEtdRYlY
- Ray Casting 3D: https://youtube.com/watch?v=SkaPYZOKPQg&list=PLjnbT4UISq0YcFtRFjFQqK0g6ONNCtrvY
- Graph-All Calculator 2D: https://youtube.com/watch?v=kLSc7bZW2Bs&list=PLjnbT4UISq0YLgynFSpLzml4BMC6TDZL2
- Parallax Side-Scroll Shooter 2D: https://youtube.com/watch?v=l9bIYkZepPo&list=PLjnbT4UISq0Y_7IAN_zUzxgZnfhXxo_0Q
- Road Pseudo 3D: https://youtube.com/watch?v=rA4g4VX7ys8&list=PLjnbT4UISq0bnfd1RC3M4PgTgkmhlkikV
- Arena Shooter 2D: https://youtube.com/watch?v=VKjiuq437t0&list=PLjnbT4UISq0adw__Y9B2eXA0LL35TyORU

Websites:
---------------------
- GitHub: https://github.com/JDoucette
- Indie Game Studio: http://xona.com
- Blog: http://thefirstpixel.com







Tags:
gamedev
monogame
indie
development
graphics
engine
xona
firstpixel
pixel
pixelart
retro
coding
wolf3d
raycast
raycasting
software
custom
shader