memesearch
Stop Using Floats

Stop Using Floats

Download Find similar pictures
Text on the meme
STOP USING FLOATS BINARY DATA WAS NOT SUPPOSED TO HAVE DECIMAL PARTS YEARS OF COMPILER DEVELOPMENT yet NO REAL-WORLD USE FOUND for anything other than char and int Wanted to use decimal numbers anyway for a laugh? We had a tool for that: It was called FIXED-POINT ARITHMETIC ‘x=-x can be FALSE’, ⅙ is a number, ‘the sum of 1⁄10 and 2⁄10 is 0.300000000004’—statements dreamt up by the utterly Deranged LOOK at what Floating-Point Numbers have been demanding your Respect for all this time, with all the circuits and data types we built for them (This is REAL Floating-Point Arithmetic, done by REAL computers): sign exponent (8 bits) significand (23 bits) = 0.15625 (bit index) ‘Hello, I want to know if f is a real number and less than −1 please?’ ‘Sure, that’ll be f!=f?0:-1/0.f==f||f==−1.f?0:-1.f>f’ They have played us for absolute fools
What it means

Текстовая шутка в формате псевдоагрессивного манифеста требует прекратить использовать числа с плавающей точкой и перечисляет их «преступления». Внизу показаны фрагменты низкоуровневого кода, схема числа IEEE 754 и абсурдный диалог о проверке вещественного числа. Пан punchline в том, что сложная компьютерная арифметика якобы обманула людей, хотя весь пост намеренно преувеличивает реальные особенности floating-point вычислений.

Objects
Tags
Sources
Type
image
Size
800×800 · 155.1 KiB
Mood
саркастичный, абсурдный
Language
en
Added

Similar memes