A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: A Bug In Maths, 81 divided by 2 error

  1. #1
    doItLikeThis
    Join Date
    Jan 2004
    Location
    :noitacoL
    Posts
    1,080

    A Bug In Maths, 81 divided by 2 error

    If you divide 81 by 2 using the normal division method, you get 4.5 as the answer, when the answer should be 40.5

    Discuss?
    -Aditya

  2. #2
    FK Romeo martiansam's Avatar
    Join Date
    Oct 2001
    Location
    Bombay, India
    Posts
    223
    Code:
    var int_val:Number = 81;
    trace((int_val/2)); // 40.5
    
    trace(81/2); //40.5
    What are you talking about Adit?
    sameer rao

    there...you see!!

  3. #3
    doItLikeThis
    Join Date
    Jan 2004
    Location
    :noitacoL
    Posts
    1,080
    Try dividing manually, the basic division technique taught in schools.
    -Aditya

  4. #4
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927
    Quote Originally Posted by adit_ya_sharma View Post
    Try dividing manually, the basic division technique taught in schools.
    That's weird, if I try that, I am getting 31.77777(7 repeats infinitely). I think you're onto something here.
    who is this? a word of friendly advice: FFS stop using AS2

  5. #5
    Senior Member random25's Avatar
    Join Date
    Apr 2002
    Posts
    566
    The way i was taught in school.

    2 goes into 8, 4 times = 4

    2 goes into 1, 0 times = 40

    2 goes into 10, 5 times = 40.5

    Or you can simply split it in half since we're dividing by 2, half of 80 is 40, half of 1 is .5
    I don't know who taught you how to divide, but they did it wrong.

    If you want to make an apple pie from scratch, you must first create the universe. Carl Sagan

  6. #6
    doItLikeThis
    Join Date
    Jan 2004
    Location
    :noitacoL
    Posts
    1,080
    wait, you dont know that division technique taught in indian schools, no wonder we gettin all the jobs man lol
    -Aditya

  7. #7
    FK Romeo martiansam's Avatar
    Join Date
    Oct 2001
    Location
    Bombay, India
    Posts
    223
    Hey aditya,

    Can you tell what answer do you get when you divide 82 by 4?
    sameer rao

    there...you see!!

  8. #8
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927
    I am getting 42. Looks like you've found THE question.
    who is this? a word of friendly advice: FFS stop using AS2

  9. #9
    doItLikeThis
    Join Date
    Jan 2004
    Location
    :noitacoL
    Posts
    1,080
    Quote Originally Posted by martiansam View Post
    Hey aditya,

    Can you tell what answer do you get when you divide 82 by 4?
    :O my god, another one. I am getting 2.5.
    -Aditya

  10. #10
    FK Romeo martiansam's Avatar
    Join Date
    Oct 2001
    Location
    Bombay, India
    Posts
    223
    That explains.
    sameer rao

    there...you see!!

  11. #11
    Junior Member
    Join Date
    Jun 2013
    Posts
    2
    Quote Originally Posted by adit_ya_sharma View Post
    :O my god, another one. I am getting 2.5.
    should not you be getting 20.5, okay it's division on units i.e., 8/4 and 2/4, so is 2.5

  12. #12
    doItLikeThis
    Join Date
    Jan 2004
    Location
    :noitacoL
    Posts
    1,080
    Try 'Long Division' method.
    -Aditya

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center