Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

A handy chart for Math class. Check it out.

 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While preparing for the Exam I wrote a small Java appln. to test the Math class's abs(),floor(),ceil(),round() methods for various input values. I thought it may be helpful for others also to verify their readiness in Math class. Any comments welcome. (The Table is well below this page. I don't know why these new lines are added.)
<table BORDER=0 > <tr > <td ></td> <td></td> </tr> <tr > <td></td> <td > <table ID="Table1" BORDER=1 > <tr> <td > Input (double)</td> <td > round() (long)</td> <td > ceil() (double)</td> <td > floor() (double)</td> <td > abs() (double)</td> </tr> <tr> <td > Double.NaN or Float.Nan</td> <td > 0</td> <td > Nan</td> <td > Nan</td> <td > Nan</td> </tr> <tr> <td > Double.NEGATIVE_INFINITY</td> <td > -9223372036854775808 Long.MIN_VALUE</td> <td > -Infinity</td> <td > -Infinity</td> <td > Infinity</td> </tr> <tr> <td > Double.POSITIVE_INFINITY</td> <td > 9223372036854775807 Long.MAX_VALUE</td> <td > Infinity</td> <td > Infinity</td> <td > Infinity</td> </tr> <tr> <td > Float.NEGATIVE_INFINITY</td> <td > -2147483648 Integer.MIN_VALUE</td> <td > -Infinity</td> <td > -Infinity</td> <td > Infinity</td> </tr> <tr> <td > Float.POSITIVE_INFINITY</td> <td > 2147483647 Integer.MAX_VALUE</td> <td > Infinity</td> <td > Infinity</td> <td > Infinity</td> </tr> <tr> <td > -4.3</td> <td > -4</td> <td > -4.0</td> <td > -5.0</td> <td > 4.3</td> </tr> <tr> <td > -99.1</td> <td > -99</td> <td > -99.0</td> <td > -100.0</td> <td > 99.1</td> </tr> <tr> <td > -99.0</td> <td > -99</td> <td > -99.0</td> <td > -99.0</td> <td > 99.0</td> </tr> <tr> <td > 99.0</td> <td > 99</td> <td > 99.0</td> <td > 99.0</td> <td > 99.0</td> </tr> <tr> <td > -0.01</td> <td > 0</td> <td > �-0.0</td> <td > -1.0</td> <td > 0.01</td> </tr> <tr> <td > 0.1</td> <td > 0</td> <td > 1.0</td> <td > 0.0</td> <td > 0.1</td> </tr> <tr> <td > -4.0</td> <td > -4</td> <td > -4.0</td> <td > -4.0</td> <td > 4.0</td> </tr> <tr> <td > -4.5</td> <td > -4</td> <td > -4.0</td> <td > -5.0</td> <td > 4.5</td> </tr> <tr> <td > -4.7</td> <td > -5</td> <td > -4.0</td> <td > -5.0</td> <td > 4.7</td> </tr> <tr> <td >�</td> </tr> <tr> <td >

-inf ... Long.MIN.... Integer.MIN� ....-100� -99� -98... -1 -0.0�� 0.0� +1 .....98� 99� 100 .... Integer.MAX ... Long.MAX....+inf�� -- Remember this sale</td> </tr> <tr> <td >�</td> </tr> <tr> <td > Double.MIN_VALUE��� 4.9E-324����������������������� Double.MAX_VALUE��� 1.7976931348623157E308</td> </tr> <tr> <td > Float.MIN_VALUE������ 1.4E-45������������������������� Float.MAX_VALUE���� 3.4028235E38</td> </tr> <tr> <td > Long.MIN_VALUE����� -9223372036854775808� Long.MAX_VALUE���� 9223372036854775807</td> </tr> <tr> <td > Integer.MIN_VALUE�� -2147483648������������������� Integer.MAX_VALUE� 2147483647</td> </tr> <tr> <td >�</td> </tr> </table> </td> </tr> </table>

[This message has been edited by maha anna (edited February 29, 2000).]

 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happened? Jim....... Can you edit this Table?

[This message has been edited by maha anna (edited February 10, 2000).]
 
crispy bacon. crispy tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic