C++ Programming Tutorial 21 - Floating Point Numbers

แชร์
ฝัง

ความคิดเห็น • 41

  • @ulukoruetc
    @ulukoruetc 2 หลายเดือนก่อน

    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.

  • @hishamzaza174
    @hishamzaza174 5 ปีที่แล้ว +20

    You turned into Linus from LTT with that segway

  • @WaCrex
    @WaCrex 4 ปีที่แล้ว +4

    @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.

  • @mtraven23
    @mtraven23 2 ปีที่แล้ว +1

    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!

  • @fahimjaowad8717
    @fahimjaowad8717 4 ปีที่แล้ว +2

    I learnt today why it is called floating point.
    Thanks.

  • @raviel_0422
    @raviel_0422 4 ปีที่แล้ว +7

    I like how you insert the sponsor through code-related stuff ahaha

  • @Mr.doordiee
    @Mr.doordiee 4 ปีที่แล้ว +9

    "maybe read it when you can't sleep it'll help you out " lmaoooo

  • @mar0uane
    @mar0uane 9 หลายเดือนก่อน

    i like the transition in this guy voice

  • @LilySteph1949
    @LilySteph1949 2 ปีที่แล้ว

    Thanks for making this easy to understand my instructor does

  • @creativexgamer5845
    @creativexgamer5845 ปีที่แล้ว

    start at 1:10

  • @yourdadsbestfriend7101
    @yourdadsbestfriend7101 3 ปีที่แล้ว +1

    bro your are so amazing! funny and educative

  • @alwaysquestionyouropinions1119
    @alwaysquestionyouropinions1119 5 ปีที่แล้ว +7

    Love the joke you make videos are great man very helpful

  • @rmanobalaji6475
    @rmanobalaji6475 ปีที่แล้ว

    At 0:54

  • @suhaibhameedzuberi
    @suhaibhameedzuberi 3 ปีที่แล้ว +2

    Do string data types also have an unsigned version like integral data types do?
    For example: Unsigned float, unsigned double and unsigned long double.

  • @LilySteph1949
    @LilySteph1949 2 ปีที่แล้ว

    Thank you for making this easier to understand I truly appreciate it #Subscribed

  • @calibr0636
    @calibr0636 4 ปีที่แล้ว +1

    damnnn, i had a euphoria realzing what the e/E meant

  • @jellohotspot
    @jellohotspot 10 หลายเดือนก่อน

    Thanks yo

  • @jamerfunk
    @jamerfunk 4 ปีที่แล้ว

    CppCon 2017: Dietmar Kühl “The End of std::endl”

  • @Mehmet-qw1qp
    @Mehmet-qw1qp 3 ปีที่แล้ว +1

    has anoyone else noticed how his voice pitch changes or is it just me ?

  • @nazmullamia610
    @nazmullamia610 3 ปีที่แล้ว +2

    What if my number is integer but I'm using float.Will this work?

    • @sageelliott3558
      @sageelliott3558 2 ปีที่แล้ว

      I know that at least double will store integers, but I don't know about float.

  • @mariomoran3067
    @mariomoran3067 3 ปีที่แล้ว +2

    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?

    • @gravyguns
      @gravyguns 2 ปีที่แล้ว

      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!

  • @PunmasterSTP
    @PunmasterSTP 3 ปีที่แล้ว

    In the words of Modest Mouse, "We all float", and in the words of Pennywise, "They all float".

  • @payforhaiti
    @payforhaiti 2 ปีที่แล้ว

    LDBL says “15” for me

  • @Joshua_Cartus
    @Joshua_Cartus 4 ปีที่แล้ว +2

    so float are kinda sus...

    • @raiqd2543
      @raiqd2543 4 ปีที่แล้ว +1

      Yeh bro

  • @crimsonking3873
    @crimsonking3873 4 ปีที่แล้ว

    Why won't the output display zero when adding floats in an array if the zero appears after a few additions?

    • @crimsonking3873
      @crimsonking3873 4 ปีที่แล้ว

      @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.

    • @crimsonking3873
      @crimsonking3873 4 ปีที่แล้ว

      @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.

  • @PunmasterSTP
    @PunmasterSTP 3 ปีที่แล้ว +1

    If you run into trouble using doubles, would that be...double trouble? 😎

    • @angurishudesu
      @angurishudesu 2 ปีที่แล้ว +1

      you and your pseudopuns

    • @PunmasterSTP
      @PunmasterSTP 2 ปีที่แล้ว

      @@angurishudesu Q: What do you use to make a fake pizza?

  • @jordannolin316
    @jordannolin316 3 ปีที่แล้ว

    Oh my bad, your multiplying.

  • @SuperPatricluvyoutub
    @SuperPatricluvyoutub 3 ปีที่แล้ว

    How to do multiplication with numbers such as 0.00999694?

    • @PunmasterSTP
      @PunmasterSTP 3 ปีที่แล้ว

      What do you mean? With what would you be multiplying the 0.00999694, and where would you be storing the result?

    • @procoder7099
      @procoder7099 3 ปีที่แล้ว +1

      @@PunmasterSTP yes

    • @procoder7099
      @procoder7099 3 ปีที่แล้ว +1

      @@PunmasterSTP can you pls explain

    • @PunmasterSTP
      @PunmasterSTP 3 ปีที่แล้ว

      @@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.

  • @WalkthroughCentral10
    @WalkthroughCentral10 5 ปีที่แล้ว +20

    What fool disliked this

  • @jordannolin316
    @jordannolin316 3 ปีที่แล้ว

    Hey man your math is wrong 7.7/ 10000 is 0.00077