Java Math Audit for PTC-Lisp

Copy Markdown View Source

Warning: This file is auto-generated by mix ptc.gen_docs from priv/function_audit.exs. Manual edits will be overwritten. Edit priv/function_audit.exs instead.

Comparison of java.lang.Math methods against PTC-Lisp builtins.

See also: Function Reference | Namespace Coverage | Clojure Core Audit | Clojure String Audit | Clojure Set Audit | Clojure Walk Audit | Java Boolean Audit | Java Double Audit | Java Float Audit | Java Integer Audit | Java Long Audit | Java String Audit | Java System Audit | Java LocalDate Audit | Java Instant Audit | Java Duration Audit | Java Period Audit | Java Date Audit

Summary

Coverage excludes not_relevant entries: supported / (supported + candidate + not_classified).

StatusCount
Supported8
Candidate19
Not Relevant22
Not Classified0
Relevant Target27
Coverage8/27 (29.6%)
Total49

Details

VarStatusDescriptionNotes
IEEEremainder❌ not_relevantReturns IEEE 754 remainderlow-level IEEE 754 semantics; use rem/mod
abs✅ supportedReturns the absolute valueDIV-45: uses PTC-Lisp arbitrary-precision integers, so abs returns the mathematically correct positive value and accepts BigInt input rather than reproducing Java long-overflow/overload artifacts
acos🔲 candidateReturns the arc cosine of a valuepure math
addExact❌ not_relevantReturns sum, throwing on overflowJava overflow semantics not applicable on BEAM
asin🔲 candidateReturns the arc sine of a valuepure math
atan🔲 candidateReturns the arc tangent of a valuepure math
atan2🔲 candidateReturns angle theta from (x,y) to polar (r,theta)pure math
cbrt🔲 candidateReturns the cube root of a valuepure math
ceil✅ supportedReturns the smallest integer >= argumentDIV-42: integer-returning PTC-Lisp extension, so finite results render as integers rather than Java's double shape
copySign❌ not_relevantReturns first arg with sign of second arglow-level IEEE 754 manipulation
cos🔲 candidateReturns the trigonometric cosine of an anglepure math
cosh🔲 candidateReturns the hyperbolic cosine of a valuepure math
decrementExact❌ not_relevantReturns argument decremented by one, throwing on overflowJava overflow semantics not applicable on BEAM
exp🔲 candidateReturns Euler's number e raised to the power of apure math
expm1❌ not_relevantReturns e^x - 1specialized numerical precision, low demand
floor✅ supportedReturns the largest integer <= argumentDIV-42: integer-returning PTC-Lisp extension, so finite results render as integers rather than Java's double shape
floorDiv❌ not_relevantReturns floor of integer divisionJava integer division semantics; use quot + floor
floorMod❌ not_relevantReturns floor modulus of argumentsJava integer semantics; use mod
fma❌ not_relevantFused multiply-addspecialized numerical precision
getExponent❌ not_relevantReturns unbiased exponent of a float/doublelow-level IEEE 754 inspection
hypot🔲 candidateReturns sqrt(x^2 + y^2) without intermediate overflowpure math
incrementExact❌ not_relevantReturns argument incremented by one, throwing on overflowJava overflow semantics not applicable on BEAM
log🔲 candidateReturns the natural logarithm (base e) of a valuepure math
log10🔲 candidateReturns the base 10 logarithm of a valuepure math
log1p❌ not_relevantReturns ln(1 + x)specialized numerical precision, low demand
max✅ supportedReturns the greater of two valuesDIV-44: max is the Clojure-named variadic helper (Math/max is an alias), not Java's two-argument primitive. DIV-45: mixed numeric and total-ordering comparisons are accepted via PTC-Lisp's generic value model rather than Java's primitive overloads
min✅ supportedReturns the smaller of two valuesDIV-44: min is the Clojure-named variadic helper (Math/min is an alias), not Java's two-argument primitive. DIV-45: mixed numeric and total-ordering comparisons are accepted via PTC-Lisp's generic value model rather than Java's primitive overloads
multiplyExact❌ not_relevantReturns product, throwing on overflowJava overflow semantics not applicable on BEAM
multiplyHigh❌ not_relevantReturns high 64 bits of 128-bit productlow-level 64-bit arithmetic
negateExact❌ not_relevantReturns negation, throwing on overflowJava overflow semantics not applicable on BEAM
nextAfter❌ not_relevantReturns adjacent floating-point valuelow-level IEEE 754 manipulation
nextDown❌ not_relevantReturns adjacent floating-point value towards negative infinitylow-level IEEE 754 manipulation
nextUp❌ not_relevantReturns adjacent floating-point value towards positive infinitylow-level IEEE 754 manipulation
pow✅ supportedReturns the value of a raised to the power of bFollows java.lang.Math.pow's IEEE 754 special-case table, returning :nan / :infinity / :negative_infinity as recoverable signal values instead of raising (e.g. (pow -1 0.5) => NaN, (pow 0 -1) => Inf)
random🔲 candidateReturns a pseudorandom double between 0.0 and 1.0pure (non-deterministic but side-effect free)
rint❌ not_relevantReturns closest double to argument that is a mathematical integeruse round instead
round✅ supportedReturns the closest long/int to the argumentDIV-43: round-half-away-from-zero, integer result, and special values (NaN/infinity) are preserved rather than Java's floor(x+0.5) and long saturation. DIV-45: integer and BigInt arguments are accepted (returned unchanged) via PTC-Lisp's value model rather than Java's float/double-only overloads
scalb❌ not_relevantReturns d × 2^scaleFactorlow-level IEEE 754 manipulation
signum🔲 candidateReturns the signum function of the argumentpure math
sin🔲 candidateReturns the trigonometric sine of an anglepure math
sinh🔲 candidateReturns the hyperbolic sine of a valuepure math
sqrt✅ supportedReturns the positive square root of a value
subtractExact❌ not_relevantReturns difference, throwing on overflowJava overflow semantics not applicable on BEAM
tan🔲 candidateReturns the trigonometric tangent of an anglepure math
tanh🔲 candidateReturns the hyperbolic tangent of a valuepure math
toDegrees🔲 candidateConverts an angle from radians to degreespure math
toIntExact❌ not_relevantReturns long narrowed to int, throwing on overflowJava type narrowing not applicable on BEAM
toRadians🔲 candidateConverts an angle from degrees to radianspure math
ulp❌ not_relevantReturns size of an ulp of the argumentlow-level IEEE 754 inspection