I am having a freaking revelation right now. This video gave me Vietnam stye flash backs of countles nights pulling my hair out infront of a screen for university projects just because none of my teachers thoughts floating point reliability is important enough to teach. You cured my PTSD. God bless you.
@6:58 Memory or CPU resources, some low powered ARM CPU's (used in embedded devices) comes with an FPU (floating-point unit), a math coprocessor fully dedicated for math on floating-point numbers.
I wanted to learn about the internal structure of floats, which you explicitly said you weren't covering...I watched anyways, really glad I did. I was totally unaware of the precision concern!
Hey Caleb, I have a question, I am using Microsoft Visual Studio 2019 and for some reason, for LDBL_DIG I am getting 15? and it is treating my long double as a normal double. Any ideas?
Go to a whisky bar and when the bartender ask you what type of shot you want, tell the bartender "a double, please." Drink the double so that it can double your brain power, and you will realize the answer to your problem. Drink up!
@Peterolen It prints a hexadecimal even though right before the print I have the variable equal zero. After putting 24 hrs into it and not getting it to work I just changed it to int and made a work around.
@Peterolen You're right it's scientific notation and I couldn't figure out why. This makes more sense now that I know. I thought it was a hexadecimal at quick glance. The math was simple addition and subtraction. I have no clue why it was giving me that number and still don't know.
@@procoder7099 Sure. I think it is fine to use literal values in arithmetic operations. For instance, you could write something like: double x = 0.123; x = x * 0.00999694; Like I wrote above, you could store the result of the multiplication into a variable (including back into the same one). You could also print it.
I am having a freaking revelation right now. This video gave me Vietnam stye flash backs of countles nights pulling my hair out infront of a screen for university projects just because none of my teachers thoughts floating point reliability is important enough to teach. You cured my PTSD. God bless you.
You turned into Linus from LTT with that segway
@6:58 Memory or CPU resources, some low powered ARM CPU's (used in embedded devices) comes with an FPU (floating-point unit), a math coprocessor fully dedicated for math on floating-point numbers.
I wanted to learn about the internal structure of floats, which you explicitly said you weren't covering...I watched anyways, really glad I did. I was totally unaware of the precision concern!
I learnt today why it is called floating point.
Thanks.
I like how you insert the sponsor through code-related stuff ahaha
"maybe read it when you can't sleep it'll help you out " lmaoooo
i like the transition in this guy voice
Thanks for making this easy to understand my instructor does
start at 1:10
bro your are so amazing! funny and educative
Love the joke you make videos are great man very helpful
At 0:54
Do string data types also have an unsigned version like integral data types do?
For example: Unsigned float, unsigned double and unsigned long double.
Thank you for making this easier to understand I truly appreciate it #Subscribed
damnnn, i had a euphoria realzing what the e/E meant
Thanks yo
CppCon 2017: Dietmar Kühl “The End of std::endl”
has anoyone else noticed how his voice pitch changes or is it just me ?
What if my number is integer but I'm using float.Will this work?
I know that at least double will store integers, but I don't know about float.
Hey Caleb, I have a question, I am using Microsoft Visual Studio 2019 and for some reason, for LDBL_DIG I am getting 15? and it is treating my long double as a normal double. Any ideas?
Go to a whisky bar and when the bartender ask you what type of shot you want, tell the bartender "a double, please." Drink the double so that it can double your brain power, and you will realize the answer to your problem. Drink up!
In the words of Modest Mouse, "We all float", and in the words of Pennywise, "They all float".
LDBL says “15” for me
so float are kinda sus...
Yeh bro
Why won't the output display zero when adding floats in an array if the zero appears after a few additions?
@Peterolen It prints a hexadecimal even though right before the print I have the variable equal zero. After putting 24 hrs into it and not getting it to work I just changed it to int and made a work around.
@Peterolen You're right it's scientific notation and I couldn't figure out why. This makes more sense now that I know. I thought it was a hexadecimal at quick glance. The math was simple addition and subtraction. I have no clue why it was giving me that number and still don't know.
If you run into trouble using doubles, would that be...double trouble? 😎
you and your pseudopuns
@@angurishudesu Q: What do you use to make a fake pizza?
Oh my bad, your multiplying.
How to do multiplication with numbers such as 0.00999694?
What do you mean? With what would you be multiplying the 0.00999694, and where would you be storing the result?
@@PunmasterSTP yes
@@PunmasterSTP can you pls explain
@@procoder7099 Sure. I think it is fine to use literal values in arithmetic operations. For instance, you could write something like:
double x = 0.123;
x = x * 0.00999694;
Like I wrote above, you could store the result of the multiplication into a variable (including back into the same one). You could also print it.
What fool disliked this
Hey man your math is wrong 7.7/ 10000 is 0.00077