Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some detail about floating number types #27

Open
vladak opened this issue Oct 27, 2023 · 1 comment
Open

add some detail about floating number types #27

vladak opened this issue Oct 27, 2023 · 1 comment

Comments

@vladak
Copy link
Member

vladak commented Oct 27, 2023

I had a revelation recently about a particular use case (different language, different context - adafruit/Adafruit_CircuitPython_MiniMQTT#176) about floating point types which prompted me to realize that we should probably mention some of the floating point type characteristics in the lecture, specifically about the loss of precision when adding up a floating value. Maybe some basic introduction to the IEEE 754 Floating-Point Standard. Nothing too detailed, just warn the students about the pitfalls when working with such numbers, similarly to what we do with integer overflow and such. This is probably a topic that should be covered in some other lecture, however my suspicion is that this is not covered anywhere within the faculty curriculum.

@vladak
Copy link
Member Author

vladak commented Oct 27, 2023

I already added https://github.com/devnull-cz/c-prog-lang/blob/master/src/float-precision.c to demonstrate limited precision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant