• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I get the source code for java.Math class?

 
Neha Gap
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

The subject says it all.

Any help would be appreciated.

Thanks,
Neha.
 
Paul Clapham
Sheriff
Posts: 21001
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have downloaded a Java JDK, you will find a file named "src.zip" in the directory where you installed it. You'll find all of the source code for the Java API in there, all 5000-odd classes.
 
Rob Spoor
Sheriff
Pie
Posts: 20514
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The source of java.lang.Math won't help you out much though. Most methods delegate to a similar method in class java.lang.StrictMath, and most of that class' methods are native.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But there is a link in the java.lang.StrictMath javadoc to a file where all the algorithms are written.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic