• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Interesting number thread

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Originally posted by k2p2 View Post
    However, zero / zero also returns undefined.
    Huh?

    Code:

    public class Test {

    public static void main(String[] args) {
    System.out.println("Zero / Zero is: " + (0 / 0));
    }

    }

    Result:

    Exception in thread "main" java.lang.ArithmeticException: / by zero
    at Test.main(Test.java:6)

    This is exactly the same exception raising as (1 / 0).
    Last edited by nomadd; 9 April 2012, 16:15.
    nomadd liked this post

    Comment


      #22
      Originally posted by nomadd View Post
      Huh?

      Code:

      public class Test {

      public static void main(String[] args) {
      System.out.println("Zero / Zero is: " + (0 / 0));
      }

      }

      Result:

      Exception in thread "main" java.lang.ArithmeticException: / by zero
      at com.toneline.Test.main(Test.java:6)

      This is exactly the same exception raising as (1 / 0).
      I tried it in a calculator.

      Comment


        #23
        Originally posted by k2p2 View Post
        I tried it in a calculator.
        Casio fx-83MS:

        (1/0) = Math ERROR
        (0/0) = Math ERROR

        nomadd liked this post

        Comment


          #24
          10 - the base of our numeric system and consequently, the metric system.

          Also the modal number of fingers or toes on a person.
          Originally posted by MaryPoppins
          I'd still not breastfeed a nazi
          Originally posted by vetran
          Urine is quite nourishing

          Comment


            #25
            Originally posted by nomadd View Post
            Actually, mathematically, division by zero is undefined. So you lose.

            Side-note: The IEEE 754 Computer Standard for representing floating-point numbers in computers returns the standard's value of -+infinity, but the value itself meaningless; the associated Division by zero exception highlights this.
            I was reading about this earlier too, and didn't realise + and - zero were held in floating point (as well as NaN and undefined, IIRC).

            Comment


              #26
              11

              Easy way to multiply by 11 mentally: Starting from the rightmost digit (though I usually start from the left when doing it mentally) add its next-door neighbour digit to give an answer digit, not forgetting to carry when you do the next digit to the left of the current one, and continue like this until you run out of digits.

              Comment


                #27
                Originally posted by nomadd View Post
                Casio fx-83MS:

                (1/0) = Math ERROR
                (0/0) = Math ERROR



                Still think it should be 0.

                Comment


                  #28
                  Originally posted by TimberWolf View Post
                  Easy way to multiply by 11 mentally: Starting from the rightmost digit (though I usually start from the left when doing it mentally) add its next-door neighbour digit to give an answer digit, not forgetting to carry when you do the next digit to the left of the current one, and continue like this until you run out of digits.
                  Now that's very handy. You don't know the number (no pun intended) of times I've been stuck on this at the checkout in Tesco. Cheers.
                  nomadd liked this post

                  Comment


                    #29
                    12

                    12 is an immensely important symbolic number in the Torah and Old Testament, and by continuation, the NT also.
                    Originally posted by MaryPoppins
                    I'd still not breastfeed a nazi
                    Originally posted by vetran
                    Urine is quite nourishing

                    Comment


                      #30
                      Originally posted by k2p2 View Post


                      Still think it should be 0.
                      Jesus, that's Microsoft software. Surprised it didn't print out 5.

                      Or Blue Screen.

                      EDIT: Aurora DB453B calculator:

                      (1/0) = NE (Number Error)
                      (0/0) = NE (Number Error)
                      nomadd liked this post

                      Comment

                      Working...
                      X