Skip to content

Commit ba19d71

Browse files
authored
Merge pull request #25 from AVSystem/math-util-descriptions
Math util descriptions
2 parents 1ce95b1 + 50b7a72 commit ba19d71

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
package com.avsystem.scex.presentation
2+
3+
import com.avsystem.scex.presentation.SymbolAttributes._
4+
import com.avsystem.scex.symboldsl.SymbolInfo
5+
6+
object MathAttributes {
7+
final val scalaMathAttributes: List[SymbolInfo[Attributes]] = attributes {
8+
on { m: math.`package`.type =>
9+
m.IEEEremainder _ --> Attributes(documentation = "Returns the remainder resulting from the division of a specified number `x` by another specified number `y`.")
10+
11+
m.abs(_: Double) --> Attributes(documentation = "Returns absolute value of the `x` argument.")
12+
m.abs(_: Float) --> Attributes(documentation = "Returns absolute value of the `x` argument.")
13+
m.abs(_: Int) --> Attributes(documentation = "Returns absolute value of the `x` argument.")
14+
m.abs(_: Long) --> Attributes(documentation = "Returns absolute value of the `x` argument.")
15+
16+
m.acos _ --> Attributes(documentation = "Returns the arc cosine of the `x` argument.")
17+
18+
m.addExact(_: Int, _: Int) --> Attributes(documentation = "Returns the sum of `x` and `y` arguments.")
19+
m.addExact(_: Long, _: Long) --> Attributes(documentation = "Returns the sum of `x` and `y` arguments.")
20+
21+
m.asin _ --> Attributes(documentation = "Returns the arc sine of the `x` argument.")
22+
m.atan _ --> Attributes(documentation = "Returns the arc tangent of the `x` argument.")
23+
m.atan2 _ --> Attributes(documentation = "Returns the rectangular coordinates (x, y) converted to polar (r, theta).")
24+
25+
m.cbrt _ --> Attributes(documentation = "Returns the cube root of the `x` argument.")
26+
27+
m.ceil _ --> Attributes(documentation = "Returns the smallest double value that is greater than or equal to the `x` argument and is equal to a mathematical integer.")
28+
29+
m.copySign(_: Double, _: Double) --> Attributes(documentation = "Returns the first argument `magnitude` with the sign of the second argument `sign`.")
30+
m.copySign(_: Float, _: Float) --> Attributes(documentation = "Returns the first argument `magnitude` with the sign of the second argument `sign`.")
31+
32+
m.cos _ --> Attributes(documentation = "Returns the cosine of the `x` argument.")
33+
m.cosh _ --> Attributes(documentation = "Returns the hyperbolic cosine of the `x` argument.")
34+
35+
m.decrementExact(_: Int) --> Attributes(documentation = "Returns the `x` argument decremented by one.")
36+
m.decrementExact(_: Long) --> Attributes(documentation = "Returns the `x` argument decremented by one.")
37+
38+
m.exp _ --> Attributes(documentation = "Returns the Euler's number raised to the power of the `x` argument.")
39+
m.expm1 _ --> Attributes(documentation = "Returns `exp(x) - 1`, the Euler's number raised to the power of the `x` argument minus one.")
40+
41+
m.floor _ --> Attributes(documentation = "Returns the largest double value less than or equal to the `x` argument.")
42+
m.floorDiv(_: Int, _: Int) --> Attributes(documentation = "Returns the largest integer value less than or equal to the algebraic quotient, " + "where `x` is the dividend and `y` is the divisor.")
43+
m.floorDiv(_: Long, _: Long) --> Attributes(documentation = "Returns the largest long value less than or equal to the algebraic quotient, " + "where `x` is the dividend and `y` is the divisor.")
44+
m.floorMod(_: Int, _: Int) --> Attributes(documentation = "Returns the floor modulus of the provided arguments, " + "where `x` is the dividend and `y` is the divisor.")
45+
m.floorMod(_: Long, _: Long) --> Attributes(documentation = "Returns the floor modulus of the provided arguments, " + "where `x` is the dividend and `y` is the divisor.")
46+
47+
m.getExponent(_: Double) --> Attributes(documentation = "Returns the unbiased exponent used in the representation of the `d` argument.")
48+
m.getExponent(_: Float) --> Attributes(documentation = "Returns the unbiased exponent used in the representation of the `f` argument.")
49+
50+
m.hypot _ --> Attributes(documentation = "Returns the square root of the sum of the squares of both `x` and `y` arguments without intermediate underflow or overflow.")
51+
52+
m.incrementExact(_: Int) --> Attributes(documentation = "Returns the `x` argument incremented by one.")
53+
m.incrementExact(_: Long) --> Attributes(documentation = "Returns the `x` argument incremented by one.")
54+
55+
m.log _ --> Attributes(documentation = "Returns natural logarithm of the `x` argument.")
56+
m.log10 _ --> Attributes(documentation = "Returns base 10 natural logarithm of the `x` argument.")
57+
m.log1p _ --> Attributes(documentation = "Returns the natural logarithm of the sum of the `x` argument and 1")
58+
59+
m.max(_: Double, _: Double) --> Attributes(documentation = "Returns the greater of the provided `x` and `y` arguments.")
60+
m.max(_: Float, _: Float) --> Attributes(documentation = "Returns the greater of the provided `x` and `y` arguments.")
61+
m.max(_: Int, _: Int) --> Attributes(documentation = "Returns the greater of the provided `x` and `y` arguments.")
62+
m.max(_: Long, _: Long) --> Attributes(documentation = "Returns the greater of the provided `x` and `y` arguments.")
63+
64+
m.min(_: Double, _: Double) --> Attributes(documentation = "Returns the lesser of the provided `x` and `y` arguments.")
65+
m.min(_: Float, _: Float) --> Attributes(documentation = "Returns the lesser of the provided `x` and `y` arguments.")
66+
m.min(_: Int, _: Int) --> Attributes(documentation = "Returns the lesser of the provided `x` and `y` arguments.")
67+
m.min(_: Long, _: Long) --> Attributes(documentation = "Returns the lesser of the provided `x` and `y` arguments.")
68+
69+
m.multiplyExact(_: Int, _: Int) --> Attributes(documentation = "Returns the product of the `x` and `y` arguments.")
70+
m.multiplyExact(_: Long, _: Long) --> Attributes(documentation = "Returns the product of the `x` and `y` arguments.")
71+
72+
m.negateExact(_: Int) --> Attributes(documentation = "Returns negation of the provided `x` argument.")
73+
m.negateExact(_: Long) --> Attributes(documentation = "Returns negation of the provided `x` argument.")
74+
75+
m.nextAfter(_: Double, _: Double) --> Attributes(documentation = "Returns the floating-point number adjacent to the `start` argument in the direction of the `direction` argument.")
76+
m.nextAfter(_: Float, _: Double) --> Attributes(documentation = "Returns the floating-point number adjacent to the `start` argument in the direction of the `direction` argument.")
77+
m.nextDown(_: Double) --> Attributes(documentation = "Returns the floating-point value adjacent to the `d` argument in the direction of negative infinity.")
78+
m.nextDown(_: Float) --> Attributes(documentation = "Returns the floating-point value adjacent to the `f` argument in the direction of negative infinity.")
79+
m.nextUp(_: Double) --> Attributes(documentation = "Returns the floating-point value adjacent to the `d` argument in the direction of positive infinity.")
80+
m.nextUp(_: Float) --> Attributes(documentation = "Returns the floating-point value adjacent to the `f` argument in the direction of positive infinity.")
81+
82+
m.pow(_: Double, _: Double) --> Attributes(documentation = "Returns the value of the `x` argument raised to the power of the the `y` argument. ")
83+
84+
m.rint _ --> Attributes(documentation = "Returns the closest floating point value that is equal to a mathematical integer for the `x` argument.")
85+
86+
m.round(_: Double) --> Attributes(documentation = "Returns the `x` argument rounded to the closest integer value.")
87+
m.round(_: Float) --> Attributes(documentation = "Returns the `x` argument rounded to the closest integer value.")
88+
m.round(_: Long) --> Attributes(documentation = "Returns the `x` argument rounded to the closest integer value.")
89+
90+
m.scalb(_: Double, _: Int) --> Attributes(documentation = "Returns `d` times 2 to the power of `scaleFactor` " + "rounded as if performed by a single correctly rounded floating-point multiply.")
91+
m.scalb(_: Float, _: Int) --> Attributes(documentation = "Returns `f` times 2 to the power of `scaleFactor` " + "rounded as if performed by a single correctly rounded floating-point multiply.")
92+
93+
m.signum(_: Double) --> Attributes(documentation = "Returns the signum function of the `x` argument.")
94+
m.signum(_: Float) --> Attributes(documentation = "Returns the signum function of the `x` argument.")
95+
m.signum(_: Int) --> Attributes(documentation = "Returns the signum function of the `x` argument.")
96+
m.signum(_: Long) --> Attributes(documentation = "Returns the signum function of the `x` argument.")
97+
98+
m.sin _ --> Attributes(documentation = "Returns the sine of the `x` argument.")
99+
m.sinh _ --> Attributes(documentation = "Returns the hyperbolic sine of the `x` argument.")
100+
101+
m.sqrt _ --> Attributes(documentation = "Returns the square root of the `x` argument.")
102+
103+
m.subtractExact(_: Int, _: Int) --> Attributes(documentation = "Returns the difference of the `x` and `y` arguments.")
104+
m.subtractExact(_: Long, _: Long) --> Attributes(documentation = "Returns the difference of the `x` and `y` arguments.")
105+
106+
m.tan _ --> Attributes(documentation = "Returns the tangent of the `x` argument.")
107+
m.tanh _ --> Attributes(documentation = "Returns the hyperbolic tangent of the `x` argument.")
108+
109+
m.toDegrees _ --> Attributes(documentation = "Returns an angle measured in radians `x` converted to an approximately equivalent angle measured in degrees.")
110+
m.toRadians _ --> Attributes(documentation = "Returns an angle measured in degrees `x` converted to an approximately equivalent angle measured in radians.")
111+
112+
m.ulp(_: Double) --> Attributes(documentation = "Returns the size of a unit in the last place of the `x` argument.")
113+
m.ulp(_: Float) --> Attributes(documentation = "Returns the size of a unit in the last place of the `x` argument.")
114+
}
115+
}
116+
}

0 commit comments

Comments
 (0)