Java Doc for Math.java in  » Apache-Harmony-Java-SE » java-package » java » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Math

Math
final public class Math (Code)
Class math provides various floating point support routines and some standard constants.


Field Summary
final public static  doubleE
     Standard math constants.
final public static  doublePI
    


Method Summary
native public static  doubleIEEEremainder(double d1, double d2)
     Answers the remainder of dividing the first argument by the second using the IEEE 754 rules.
public static  doubleabs(double d)
     Answers the absolute value of the argument.
public static  floatabs(float f)
     Answers the absolute value of the argument.
public static  intabs(int i)
     Answers the absolute value of the argument.
public static  longabs(long l)
     Answers the absolute value of the argument.
native public static  doubleacos(double d)
    
native public static  doubleasin(double d)
    
native public static  doubleatan(double d)
    
native public static  doubleatan2(double d1, double d2)
     Answers the closest double approximation of the arc tangent of the result of dividing the first argument by the second argument.
native public static  doublecbrt(double d)
     Answers the closest double approximation of the cube root of the argument.
public static  doubleceil(double d)
     Answers the double conversion of the most negative (i.e.
native public static  doublecos(double d)
    
native public static  doublecosh(double d)
     Answers the closest double approximation of the hyperbolic cosine of the argument.
native public static  doubleexp(double d)
    
native public static  doubleexpm1(double d)
     Answers the closest double approximation of ed - 1. If the argument is very close to 0, it is much more accurate to use expm1(d)+1 than exp(d). The final result should be within 1 ulp of the real result.
public static  doublefloor(double d)
     Answers the double conversion of the most positive (i.e.
native public static  doublehypot(double x, double y)
     Answers sqrt(x2+y2).
native public static  doublelog(double d)
    
native public static  doublelog10(double d)
    
native public static  doublelog1p(double d)
     Answers the closest double approximation of the natural logarithm of the sum of the argument and 1.
public static  doublemax(double d1, double d2)
     Answers the most positive (i.e.
public static  floatmax(float f1, float f2)
     Answers the most positive (i.e.
public static  intmax(int i1, int i2)
     Answers the most positive (i.e.
public static  longmax(long l1, long l2)
     Answers the most positive (i.e.
public static  doublemin(double d1, double d2)
     Answers the most negative (i.e.
public static  floatmin(float f1, float f2)
     Answers the most negative (i.e.
public static  intmin(int i1, int i2)
     Answers the most negative (i.e.
public static  longmin(long l1, long l2)
     Answers the most negative (i.e.
native public static  doublepow(double d1, double d2)
     Answers the closest double approximation of the result of raising the first argument to the power of the second.
Parameters:
  d1 - the base of the operation.
Parameters:
  d2 - the exponent of the operation.
public static  doublerandom()
     Returns a pseudo-random number between 0.0 and 1.0.
public static  doublerint(double d)
     Answers the double conversion of the result of rounding the argument to an integer.
public static  longround(double d)
     Answers the result of rounding the argument to an integer.
public static  intround(float f)
     Answers the result of rounding the argument to an integer.
public static  doublesignum(double d)
     Answers the signum function of the argument.
public static  floatsignum(float f)
     Answers the signum function of the argument.
native public static  doublesin(double d)
    
native public static  doublesinh(double d)
     Answers the closest double approximation of the hyperbolic sine of the argument.
native public static  doublesqrt(double d)
    
native public static  doubletan(double d)
    
native public static  doubletanh(double d)
     Answers the closest double approximation of the hyperbolic tangent of the argument.
public static  doubletoDegrees(double angrad)
    
public static  doubletoRadians(double angdeg)
    
public static  doubleulp(double d)
     Answers the argument's ulp.
public static  floatulp(float f)
     Answers the argument's ulp.

Field Detail
E
final public static double E(Code)
Standard math constants.



PI
final public static double PI(Code)





Method Detail
IEEEremainder
native public static double IEEEremainder(double d1, double d2)(Code)
Answers the remainder of dividing the first argument by the second using the IEEE 754 rules.
Parameters:
  d1 - the numerator of the operation
Parameters:
  d2 - the denominator of the operation the result of d1/d2.



abs
public static double abs(double d)(Code)
Answers the absolute value of the argument.
Parameters:
  d - the value to be converted the argument if it is positive, otherwise the negation of theargument.



abs
public static float abs(float f)(Code)
Answers the absolute value of the argument.
Parameters:
  f - the value to be converted the argument if it is positive, otherwise the negation of theargument.



abs
public static int abs(int i)(Code)
Answers the absolute value of the argument.
Parameters:
  i - the value to be converted the argument if it is positive, otherwise the negation of theargument.



abs
public static long abs(long l)(Code)
Answers the absolute value of the argument.
Parameters:
  l - the value to be converted the argument if it is positive, otherwise the negation of theargument.



acos
native public static double acos(double d)(Code)
Answers the closest double approximation of the arc cosine of the argument
Parameters:
  d - the value to compute acos of the arc cosine of the argument.



asin
native public static double asin(double d)(Code)
Answers the closest double approximation of the arc sine of the argument
Parameters:
  d - the value to compute asin of the arc sine of the argument.



atan
native public static double atan(double d)(Code)
Answers the closest double approximation of the arc tangent of the argument
Parameters:
  d - the value to compute atan of the arc tangent of the argument.



atan2
native public static double atan2(double d1, double d2)(Code)
Answers the closest double approximation of the arc tangent of the result of dividing the first argument by the second argument.
Parameters:
  d1 - the numerator of the value to compute atan of
Parameters:
  d2 - the denominator of the value to compute atan of the arc tangent of d1/d2.



cbrt
native public static double cbrt(double d)(Code)
Answers the closest double approximation of the cube root of the argument. The final result should be within 1ulp of the real result.
Parameters:
  d - the value to compute cube root of the cube root of the argument.



ceil
public static double ceil(double d)(Code)
Answers the double conversion of the most negative (i.e. closest to negative infinity) integer value which is greater than the argument.
Parameters:
  d - the value to be converted the ceiling of the argument.



cos
native public static double cos(double d)(Code)
Answers the closest double approximation of the cosine of the argument
Parameters:
  d - the value to compute cos of the cosine of the argument.



cosh
native public static double cosh(double d)(Code)
Answers the closest double approximation of the hyperbolic cosine of the argument. The final result should be within 2.5ulps of the real result.
Parameters:
  d - the value to compute hyperbolic cosine of the hyperbolic cosine of the argument.



exp
native public static double exp(double d)(Code)
Answers the closest double approximation of the raising "e" to the power of the argument
Parameters:
  d - the value to compute the exponential of the exponential of the argument.



expm1
native public static double expm1(double d)(Code)
Answers the closest double approximation of ed - 1. If the argument is very close to 0, it is much more accurate to use expm1(d)+1 than exp(d). The final result should be within 1 ulp of the real result. For any finite input, the result should be no less than -1.0. If the real result is within 0.5 ulp of -1, -1.0 should be answered.
Parameters:
  d - the value to compute the ed - 1 of the ed - 1 value of the argument.



floor
public static double floor(double d)(Code)
Answers the double conversion of the most positive (i.e. closest to positive infinity) integer value which is less than the argument.
Parameters:
  d - the value to be converted the ceiling of the argument.



hypot
native public static double hypot(double x, double y)(Code)
Answers sqrt(x2+y2). The final result is without medium underflow or overflow. The final result should be within 1 ulp of the real result. If one parameter remains constant, the result should be semi-monotonic.
Parameters:
  x - a double number
Parameters:
  y - a double number the sqrt(x2+y2) valueof the arguments.



log
native public static double log(double d)(Code)
Answers the closest double approximation of the natural logarithm of the argument
Parameters:
  d - the value to compute the log of the natural logarithm of the argument.



log10
native public static double log10(double d)(Code)
Answers the closest double approximation of the base 10 logarithm of the argument
Parameters:
  d - the value to compute the log10 of the natural logarithm of the argument.



log1p
native public static double log1p(double d)(Code)
Answers the closest double approximation of the natural logarithm of the sum of the argument and 1. If the argument is very close to 0, it is much more accurate to use log1p(d) than log(1.0+d). The final result should be within 1 ulp of the real result and be semi-monotonic.
Parameters:
  d - the value to compute the ln(1+d) of the natural logarithm of the sum of the argument and 1.



max
public static double max(double d1, double d2)(Code)
Answers the most positive (i.e. closest to positive infinity) of the two arguments.
Parameters:
  d1 - the first argument to check
Parameters:
  d2 - the second argument the larger of d1 and d2.



max
public static float max(float f1, float f2)(Code)
Answers the most positive (i.e. closest to positive infinity) of the two arguments.
Parameters:
  f1 - the first argument to check
Parameters:
  f2 - the second argument the larger of f1 and f2.



max
public static int max(int i1, int i2)(Code)
Answers the most positive (i.e. closest to positive infinity) of the two arguments.
Parameters:
  i1 - the first argument to check
Parameters:
  i2 - the second argument the larger of i1 and i2.



max
public static long max(long l1, long l2)(Code)
Answers the most positive (i.e. closest to positive infinity) of the two arguments.
Parameters:
  l1 - the first argument to check
Parameters:
  l2 - the second argument the larger of l1 and l2.



min
public static double min(double d1, double d2)(Code)
Answers the most negative (i.e. closest to negative infinity) of the two arguments.
Parameters:
  d1 - the first argument to check
Parameters:
  d2 - the second argument the smaller of d1 and d2.



min
public static float min(float f1, float f2)(Code)
Answers the most negative (i.e. closest to negative infinity) of the two arguments.
Parameters:
  f1 - the first argument to check
Parameters:
  f2 - the second argument the smaller of f1 and f2.



min
public static int min(int i1, int i2)(Code)
Answers the most negative (i.e. closest to negative infinity) of the two arguments.
Parameters:
  i1 - the first argument to check
Parameters:
  i2 - the second argument the smaller of i1 and i2.



min
public static long min(long l1, long l2)(Code)
Answers the most negative (i.e. closest to negative infinity) of the two arguments.
Parameters:
  l1 - the first argument to check
Parameters:
  l2 - the second argument the smaller of l1 and l2.



pow
native public static double pow(double d1, double d2)(Code)
Answers the closest double approximation of the result of raising the first argument to the power of the second.
Parameters:
  d1 - the base of the operation.
Parameters:
  d2 - the exponent of the operation. d1 to the power of d2



random
public static double random()(Code)
Returns a pseudo-random number between 0.0 and 1.0. a pseudo-random number



rint
public static double rint(double d)(Code)
Answers the double conversion of the result of rounding the argument to an integer.
Parameters:
  d - the value to be converted the closest integer to the argument (as a double).



round
public static long round(double d)(Code)
Answers the result of rounding the argument to an integer.
Parameters:
  d - the value to be converted the closest integer to the argument.



round
public static int round(float f)(Code)
Answers the result of rounding the argument to an integer.
Parameters:
  f - the value to be converted the closest integer to the argument.



signum
public static double signum(double d)(Code)
Answers the signum function of the argument. If the argument is less than zero, it answers -1.0. If greater than zero, 1.0 is returned. It returns zero if the argument is also zero.
Parameters:
  d - the value to compute signum function of the value of the signum function.



signum
public static float signum(float f)(Code)
Answers the signum function of the argument. If the argument is less than zero, it answers -1.0. If greater than zero, 1.0 is returned. It returns zero if the argument is also zero.
Parameters:
  f - the value to compute signum function of the value of the signum function.



sin
native public static double sin(double d)(Code)
Answers the closest double approximation of the sine of the argument
Parameters:
  d - the value to compute sin of the sine of the argument.



sinh
native public static double sinh(double d)(Code)
Answers the closest double approximation of the hyperbolic sine of the argument. The final result should be within 2.5ulps of the real result.
Parameters:
  d - the value to compute hyperbolic sine of the hyperbolic sine of the argument.



sqrt
native public static double sqrt(double d)(Code)
Answers the closest double approximation of the square root of the argument
Parameters:
  d - the value to compute sqrt of the square root of the argument.



tan
native public static double tan(double d)(Code)
Answers the closest double approximation of the tangent of the argument
Parameters:
  d - the value to compute tan of the tangent of the argument.



tanh
native public static double tanh(double d)(Code)
Answers the closest double approximation of the hyperbolic tangent of the argument. The absolute value is always less than 1. The final result should be within 2.5ulps of the real result. If the real result is within 0.5ulp of 1 or -1, it should answer exactly +1 or -1.
Parameters:
  d - the value to compute hyperbolic tangent of the hyperbolic tangent of the argument.



toDegrees
public static double toDegrees(double angrad)(Code)
Returns the measure in degrees of the supplied radian angle
Parameters:
  angrad - an angle in radians the degree measure of the angle.



toRadians
public static double toRadians(double angdeg)(Code)
Returns the measure in radians of the supplied degree angle
Parameters:
  angdeg - an angle in degrees the radian measure of the angle.



ulp
public static double ulp(double d)(Code)
Answers the argument's ulp. The size of a ulp of a double value is the positive distance between this value and the double value next larger in magnitude. For non-NaN x, ulp(-x) == ulp(x).
Parameters:
  d - the floating-point value to compute ulp of the size of a ulp of the argument.



ulp
public static float ulp(float f)(Code)
Answers the argument's ulp. The size of a ulp of a float value is the positive distance between this value and the float value next larger in magnitude. For non-NaN x, ulp(-x) == ulp(x).
Parameters:
  f - the floating-point value to compute ulp of the size of a ulp of the argument.



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.