
(FPCore (x y z) :precision binary64 :pre TRUE (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = ((((x - (5e-1)) * (ln(x))) - x) + (918938533204670005005709754186682403087615966796875e-51)) + ((((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) END code
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 :pre TRUE (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = ((((x - (5e-1)) * (ln(x))) - x) + (918938533204670005005709754186682403087615966796875e-51)) + ((((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) END code
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
(FPCore (x y z) :precision binary64 :pre TRUE (+ (/ 0.083333333333333 x) (fma (/ z x) (fma z (+ 0.0007936500793651 y) -0.0027777777777778) (fma (log x) (- x 0.5) (- 0.91893853320467 x)))))
double code(double x, double y, double z) {
return (0.083333333333333 / x) + fma((z / x), fma(z, (0.0007936500793651 + y), -0.0027777777777778), fma(log(x), (x - 0.5), (0.91893853320467 - x)));
}
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) + fma(Float64(z / x), fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), fma(log(x), Float64(x - 0.5), Float64(0.91893853320467 - x)))) end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = ((8333333333333299564049667651488562114536762237548828125e-56) / x) + (((z / x) * ((z * ((793650079365100014940070938251892584958113729953765869140625e-63) + y)) + (-2777777777777800001512975569539776188321411609649658203125e-60))) + (((ln(x)) * (x - (5e-1))) + ((918938533204670005005709754186682403087615966796875e-51) - x))) END code
\frac{0.083333333333333}{x} + \mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\right)
Initial program 94.3%
Applied rewrites98.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (fma z (+ 0.0007936500793651 y) -0.0027777777777778)))
(if (<= x 54438607786058.664)
(+
(/ (fma t_0 z 0.083333333333333) x)
(fma (log x) (- x 0.5) (- 0.91893853320467 x)))
(fma z (/ t_0 x) (* -1.0 (* x (+ 1.0 (log (/ 1.0 x)))))))))double code(double x, double y, double z) {
double t_0 = fma(z, (0.0007936500793651 + y), -0.0027777777777778);
double tmp;
if (x <= 54438607786058.664) {
tmp = (fma(t_0, z, 0.083333333333333) / x) + fma(log(x), (x - 0.5), (0.91893853320467 - x));
} else {
tmp = fma(z, (t_0 / x), (-1.0 * (x * (1.0 + log((1.0 / x))))));
}
return tmp;
}
function code(x, y, z) t_0 = fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778) tmp = 0.0 if (x <= 54438607786058.664) tmp = Float64(Float64(fma(t_0, z, 0.083333333333333) / x) + fma(log(x), Float64(x - 0.5), Float64(0.91893853320467 - x))); else tmp = fma(z, Float64(t_0 / x), Float64(-1.0 * Float64(x * Float64(1.0 + log(Float64(1.0 / x)))))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]}, If[LessEqual[x, 54438607786058.664], N[(N[(N[(t$95$0 * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(t$95$0 / x), $MachinePrecision] + N[(-1.0 * N[(x * N[(1.0 + N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((z * ((793650079365100014940070938251892584958113729953765869140625e-63) + y)) + (-2777777777777800001512975569539776188321411609649658203125e-60)) IN LET tmp = IF (x <= (544386077860586640625e-7)) THEN ((((t_0 * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) + (((ln(x)) * (x - (5e-1))) + ((918938533204670005005709754186682403087615966796875e-51) - x))) ELSE ((z * (t_0 / x)) + ((-1) * (x * ((1) + (ln(((1) / x))))))) ENDIF IN tmp END code
\begin{array}{l}
t_0 := \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)\\
\mathbf{if}\;x \leq 54438607786058.664:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0, z, 0.083333333333333\right)}{x} + \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t\_0}{x}, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right)\\
\end{array}
if x < 54438607786058.664Initial program 94.3%
Applied rewrites94.4%
if 54438607786058.664 < x Initial program 94.3%
Applied rewrites97.9%
Taylor expanded in x around inf
Applied rewrites76.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (fma z (+ 0.0007936500793651 y) -0.0027777777777778)))
(if (<= x 163.86616644949444)
(+
(/ (fma t_0 z 0.083333333333333) x)
(fma (log x) (- x 0.5) 0.91893853320467))
(fma z (/ t_0 x) (* -1.0 (* x (+ 1.0 (log (/ 1.0 x)))))))))double code(double x, double y, double z) {
double t_0 = fma(z, (0.0007936500793651 + y), -0.0027777777777778);
double tmp;
if (x <= 163.86616644949444) {
tmp = (fma(t_0, z, 0.083333333333333) / x) + fma(log(x), (x - 0.5), 0.91893853320467);
} else {
tmp = fma(z, (t_0 / x), (-1.0 * (x * (1.0 + log((1.0 / x))))));
}
return tmp;
}
function code(x, y, z) t_0 = fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778) tmp = 0.0 if (x <= 163.86616644949444) tmp = Float64(Float64(fma(t_0, z, 0.083333333333333) / x) + fma(log(x), Float64(x - 0.5), 0.91893853320467)); else tmp = fma(z, Float64(t_0 / x), Float64(-1.0 * Float64(x * Float64(1.0 + log(Float64(1.0 / x)))))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]}, If[LessEqual[x, 163.86616644949444], N[(N[(N[(t$95$0 * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision], N[(z * N[(t$95$0 / x), $MachinePrecision] + N[(-1.0 * N[(x * N[(1.0 + N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((z * ((793650079365100014940070938251892584958113729953765869140625e-63) + y)) + (-2777777777777800001512975569539776188321411609649658203125e-60)) IN LET tmp = IF (x <= (163866166449494443213552585802972316741943359375e-45)) THEN ((((t_0 * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) + (((ln(x)) * (x - (5e-1))) + (918938533204670005005709754186682403087615966796875e-51))) ELSE ((z * (t_0 / x)) + ((-1) * (x * ((1) + (ln(((1) / x))))))) ENDIF IN tmp END code
\begin{array}{l}
t_0 := \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)\\
\mathbf{if}\;x \leq 163.86616644949444:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0, z, 0.083333333333333\right)}{x} + \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t\_0}{x}, -1 \cdot \left(x \cdot \left(1 + \log \left(\frac{1}{x}\right)\right)\right)\right)\\
\end{array}
if x < 163.86616644949444Initial program 94.3%
Applied rewrites94.4%
Taylor expanded in x around 0
Applied rewrites72.8%
if 163.86616644949444 < x Initial program 94.3%
Applied rewrites97.9%
Taylor expanded in x around inf
Applied rewrites76.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x 163.86616644949444)
(+
(/
(fma
(fma z (+ 0.0007936500793651 y) -0.0027777777777778)
z
0.083333333333333)
x)
(fma (log x) (- x 0.5) 0.91893853320467))
(fma
(/ z x)
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
(* x (- (log x) 1.0)))))double code(double x, double y, double z) {
double tmp;
if (x <= 163.86616644949444) {
tmp = (fma(fma(z, (0.0007936500793651 + y), -0.0027777777777778), z, 0.083333333333333) / x) + fma(log(x), (x - 0.5), 0.91893853320467);
} else {
tmp = fma((z / x), fma((0.0007936500793651 + y), z, -0.0027777777777778), (x * (log(x) - 1.0)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 163.86616644949444) tmp = Float64(Float64(fma(fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), z, 0.083333333333333) / x) + fma(log(x), Float64(x - 0.5), 0.91893853320467)); else tmp = fma(Float64(z / x), fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), Float64(x * Float64(log(x) - 1.0))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 163.86616644949444], N[(N[(N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision], N[(N[(z / x), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp = IF (x <= (163866166449494443213552585802972316741943359375e-45)) THEN ((((((z * ((793650079365100014940070938251892584958113729953765869140625e-63) + y)) + (-2777777777777800001512975569539776188321411609649658203125e-60)) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) + (((ln(x)) * (x - (5e-1))) + (918938533204670005005709754186682403087615966796875e-51))) ELSE (((z / x) * ((((793650079365100014940070938251892584958113729953765869140625e-63) + y) * z) + (-2777777777777800001512975569539776188321411609649658203125e-60))) + (x * ((ln(x)) - (1)))) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq 163.86616644949444:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), z, 0.083333333333333\right)}{x} + \mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), x \cdot \left(\log x - 1\right)\right)\\
\end{array}
if x < 163.86616644949444Initial program 94.3%
Applied rewrites94.4%
Taylor expanded in x around 0
Applied rewrites72.8%
if 163.86616644949444 < x Initial program 94.3%
Applied rewrites97.9%
Taylor expanded in x around inf
Applied rewrites76.3%
Applied rewrites76.8%
Taylor expanded in x around 0
Applied rewrites76.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x 3.073278703382996)
(+
(+ 0.91893853320467 (* -0.5 (log x)))
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x))
(fma
(/ z x)
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
(* x (- (log x) 1.0)))))double code(double x, double y, double z) {
double tmp;
if (x <= 3.073278703382996) {
tmp = (0.91893853320467 + (-0.5 * log(x))) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
} else {
tmp = fma((z / x), fma((0.0007936500793651 + y), z, -0.0027777777777778), (x * (log(x) - 1.0)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 3.073278703382996) tmp = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)); else tmp = fma(Float64(z / x), fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), Float64(x * Float64(log(x) - 1.0))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 3.073278703382996], N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(z / x), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp = IF (x <= (3073278703382996024373596810619346797466278076171875e-51)) THEN (((918938533204670005005709754186682403087615966796875e-51) + ((-5e-1) * (ln(x)))) + ((((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x)) ELSE (((z / x) * ((((793650079365100014940070938251892584958113729953765869140625e-63) + y) * z) + (-2777777777777800001512975569539776188321411609649658203125e-60))) + (x * ((ln(x)) - (1)))) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq 3.073278703382996:\\
\;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), x \cdot \left(\log x - 1\right)\right)\\
\end{array}
if x < 3.073278703382996Initial program 94.3%
Taylor expanded in x around 0
Applied rewrites63.2%
if 3.073278703382996 < x Initial program 94.3%
Applied rewrites97.9%
Taylor expanded in x around inf
Applied rewrites76.3%
Applied rewrites76.8%
Taylor expanded in x around 0
Applied rewrites76.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (fma (+ 0.0007936500793651 y) z -0.0027777777777778)))
(if (<= x 2.7198285450017545)
(/ (fma t_0 z 0.083333333333333) x)
(fma (/ z x) t_0 (* x (- (log x) 1.0))))))double code(double x, double y, double z) {
double t_0 = fma((0.0007936500793651 + y), z, -0.0027777777777778);
double tmp;
if (x <= 2.7198285450017545) {
tmp = fma(t_0, z, 0.083333333333333) / x;
} else {
tmp = fma((z / x), t_0, (x * (log(x) - 1.0)));
}
return tmp;
}
function code(x, y, z) t_0 = fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778) tmp = 0.0 if (x <= 2.7198285450017545) tmp = Float64(fma(t_0, z, 0.083333333333333) / x); else tmp = fma(Float64(z / x), t_0, Float64(x * Float64(log(x) - 1.0))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision]}, If[LessEqual[x, 2.7198285450017545], N[(N[(t$95$0 * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(z / x), $MachinePrecision] * t$95$0 + N[(x * N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((793650079365100014940070938251892584958113729953765869140625e-63) + y) * z) + (-2777777777777800001512975569539776188321411609649658203125e-60)) IN LET tmp = IF (x <= (271982854500175452727717129164375364780426025390625e-50)) THEN (((t_0 * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) ELSE (((z / x) * t_0) + (x * ((ln(x)) - (1)))) ENDIF IN tmp END code
\begin{array}{l}
t_0 := \mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right)\\
\mathbf{if}\;x \leq 2.7198285450017545:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0, z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{x}, t\_0, x \cdot \left(\log x - 1\right)\right)\\
\end{array}
if x < 2.7198285450017545Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Applied rewrites63.6%
if 2.7198285450017545 < x Initial program 94.3%
Applied rewrites97.9%
Taylor expanded in x around inf
Applied rewrites76.3%
Applied rewrites76.8%
Taylor expanded in x around 0
Applied rewrites76.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x 175443438.37202394)
(/
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333)
x)
(fma
(/ z x)
(fma 0.0007936500793651 z -0.0027777777777778)
(- (* (+ (- (log x)) 1.0) x)))))double code(double x, double y, double z) {
double tmp;
if (x <= 175443438.37202394) {
tmp = fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = fma((z / x), fma(0.0007936500793651, z, -0.0027777777777778), -((-log(x) + 1.0) * x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 175443438.37202394) tmp = Float64(fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = fma(Float64(z / x), fma(0.0007936500793651, z, -0.0027777777777778), Float64(-Float64(Float64(Float64(-log(x)) + 1.0) * x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 175443438.37202394], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] + (-N[(N[((-N[Log[x], $MachinePrecision]) + 1.0), $MachinePrecision] * x), $MachinePrecision])), $MachinePrecision]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp = IF (x <= (17544343837202394008636474609375e-23)) THEN (((((((793650079365100014940070938251892584958113729953765869140625e-63) + y) * z) + (-2777777777777800001512975569539776188321411609649658203125e-60)) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) ELSE (((z / x) * (((793650079365100014940070938251892584958113729953765869140625e-63) * z) + (-2777777777777800001512975569539776188321411609649658203125e-60))) + (- (((- (ln(x))) + (1)) * x))) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq 175443438.37202394:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{x}, \mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right), -\left(\left(-\log x\right) + 1\right) \cdot x\right)\\
\end{array}
if x < 175443438.37202394Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Applied rewrites63.6%
if 175443438.37202394 < x Initial program 94.3%
Applied rewrites97.9%
Taylor expanded in x around inf
Applied rewrites76.3%
Applied rewrites76.8%
Taylor expanded in y around 0
Applied rewrites59.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
(t_1 (* (+ 0.0007936500793651 y) (* z (/ z x)))))
(if (<= t_0 -2e+16)
t_1
(if (<= t_0 1.5e+53)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 1.0 (* 12.000000000000048 x)))
t_1))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = (0.0007936500793651 + y) * (z * (z / x));
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 1.5e+53) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (12.000000000000048 * x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
t_1 = (0.0007936500793651d0 + y) * (z * (z / x))
if (t_0 <= (-2d+16)) then
tmp = t_1
else if (t_0 <= 1.5d+53) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (1.0d0 / (12.000000000000048d0 * x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = (0.0007936500793651 + y) * (z * (z / x));
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 1.5e+53) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (1.0 / (12.000000000000048 * x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z t_1 = (0.0007936500793651 + y) * (z * (z / x)) tmp = 0 if t_0 <= -2e+16: tmp = t_1 elif t_0 <= 1.5e+53: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (1.0 / (12.000000000000048 * x)) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) t_1 = Float64(Float64(0.0007936500793651 + y) * Float64(z * Float64(z / x))) tmp = 0.0 if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 1.5e+53) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(1.0 / Float64(12.000000000000048 * x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z; t_1 = (0.0007936500793651 + y) * (z * (z / x)); tmp = 0.0; if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 1.5e+53) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (12.000000000000048 * x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+16], t$95$1, If[LessEqual[t$95$0, 1.5e+53], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(1.0 / N[(12.000000000000048 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET t_1 = (((793650079365100014940070938251892584958113729953765869140625e-63) + y) * (z * (z / x))) IN LET tmp_1 = IF (t_0 <= (149999999999999998983142301154244196469256266291609600)) THEN (((((x - (5e-1)) * (ln(x))) - x) + (918938533204670005005709754186682403087615966796875e-51)) + ((1) / ((120000000000000479616346638067625463008880615234375e-49) * x))) ELSE t_1 ENDIF IN LET tmp = IF (t_0 <= (-2e16)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
t_1 := \left(0.0007936500793651 + y\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 1.5 \cdot 10^{+53}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{12.000000000000048 \cdot x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -2e16 or 1.5e53 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites42.3%
Applied rewrites44.7%
if -2e16 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.5e53Initial program 94.3%
Applied rewrites94.3%
Taylor expanded in z around 0
Applied rewrites57.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
(t_1 (* (+ 0.0007936500793651 y) (* z (/ z x)))))
(if (<= t_0 -2e+16)
t_1
(if (<= t_0 1.5e+53)
(+
(fma (log x) (- x 0.5) (- 0.91893853320467 x))
(/ 0.083333333333333 x))
t_1))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = (0.0007936500793651 + y) * (z * (z / x));
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 1.5e+53) {
tmp = fma(log(x), (x - 0.5), (0.91893853320467 - x)) + (0.083333333333333 / x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) t_1 = Float64(Float64(0.0007936500793651 + y) * Float64(z * Float64(z / x))) tmp = 0.0 if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 1.5e+53) tmp = Float64(fma(log(x), Float64(x - 0.5), Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)); else tmp = t_1; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+16], t$95$1, If[LessEqual[t$95$0, 1.5e+53], N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET t_1 = (((793650079365100014940070938251892584958113729953765869140625e-63) + y) * (z * (z / x))) IN LET tmp_1 = IF (t_0 <= (149999999999999998983142301154244196469256266291609600)) THEN ((((ln(x)) * (x - (5e-1))) + ((918938533204670005005709754186682403087615966796875e-51) - x)) + ((8333333333333299564049667651488562114536762237548828125e-56) / x)) ELSE t_1 ENDIF IN LET tmp = IF (t_0 <= (-2e16)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
t_1 := \left(0.0007936500793651 + y\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 1.5 \cdot 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(\log x, x - 0.5, 0.91893853320467 - x\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -2e16 or 1.5e53 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites42.3%
Applied rewrites44.7%
if -2e16 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.5e53Initial program 94.3%
Taylor expanded in z around 0
Applied rewrites57.3%
Applied rewrites57.4%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
(t_1 (* (+ 0.0007936500793651 y) (* z (/ z x)))))
(if (<= t_0 -2e+16)
t_1
(if (<= t_0 1.5e+53)
(-
(+
(fma (log x) (- x 0.5) (/ 0.083333333333333 x))
0.91893853320467)
x)
t_1))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = (0.0007936500793651 + y) * (z * (z / x));
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 1.5e+53) {
tmp = (fma(log(x), (x - 0.5), (0.083333333333333 / x)) + 0.91893853320467) - x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) t_1 = Float64(Float64(0.0007936500793651 + y) * Float64(z * Float64(z / x))) tmp = 0.0 if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 1.5e+53) tmp = Float64(Float64(fma(log(x), Float64(x - 0.5), Float64(0.083333333333333 / x)) + 0.91893853320467) - x); else tmp = t_1; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+16], t$95$1, If[LessEqual[t$95$0, 1.5e+53], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision] - x), $MachinePrecision], t$95$1]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET t_1 = (((793650079365100014940070938251892584958113729953765869140625e-63) + y) * (z * (z / x))) IN LET tmp_1 = IF (t_0 <= (149999999999999998983142301154244196469256266291609600)) THEN (((((ln(x)) * (x - (5e-1))) + ((8333333333333299564049667651488562114536762237548828125e-56) / x)) + (918938533204670005005709754186682403087615966796875e-51)) - x) ELSE t_1 ENDIF IN LET tmp = IF (t_0 <= (-2e16)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
t_1 := \left(0.0007936500793651 + y\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 1.5 \cdot 10^{+53}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log x, x - 0.5, \frac{0.083333333333333}{x}\right) + 0.91893853320467\right) - x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -2e16 or 1.5e53 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites42.3%
Applied rewrites44.7%
if -2e16 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.5e53Initial program 94.3%
Taylor expanded in z around 0
Applied rewrites57.3%
Applied rewrites57.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x 1.4148135358670568e+45)
(/
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333)
x)
(- (* (/ (* (- 1.0 (log x)) y) y) x))))double code(double x, double y, double z) {
double tmp;
if (x <= 1.4148135358670568e+45) {
tmp = fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = -((((1.0 - log(x)) * y) / y) * x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.4148135358670568e+45) tmp = Float64(fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(-Float64(Float64(Float64(Float64(1.0 - log(x)) * y) / y) * x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.4148135358670568e+45], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], (-N[(N[(N[(N[(1.0 - N[Log[x], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision])]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp = IF (x <= (1414813535867056792625653556705392199183892480)) THEN (((((((793650079365100014940070938251892584958113729953765869140625e-63) + y) * z) + (-2777777777777800001512975569539776188321411609649658203125e-60)) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) ELSE (- (((((1) - (ln(x))) * y) / y) * x)) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq 1.4148135358670568 \cdot 10^{+45}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;-\frac{\left(1 - \log x\right) \cdot y}{y} \cdot x\\
\end{array}
if x < 1.4148135358670568e45Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Applied rewrites63.6%
if 1.4148135358670568e45 < x Initial program 94.3%
Taylor expanded in y around inf
Applied rewrites63.1%
Taylor expanded in x around -inf
Applied rewrites34.7%
Applied rewrites34.7%
Applied rewrites34.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x 1.4148135358670568e+45)
(/
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333)
x)
(* -1.0 (* x (- 1.0 (log x))))))double code(double x, double y, double z) {
double tmp;
if (x <= 1.4148135358670568e+45) {
tmp = fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = -1.0 * (x * (1.0 - log(x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.4148135358670568e+45) tmp = Float64(fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(-1.0 * Float64(x * Float64(1.0 - log(x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.4148135358670568e+45], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(-1.0 * N[(x * N[(1.0 - N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp = IF (x <= (1414813535867056792625653556705392199183892480)) THEN (((((((793650079365100014940070938251892584958113729953765869140625e-63) + y) * z) + (-2777777777777800001512975569539776188321411609649658203125e-60)) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) ELSE ((-1) * (x * ((1) - (ln(x))))) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq 1.4148135358670568 \cdot 10^{+45}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(x \cdot \left(1 - \log x\right)\right)\\
\end{array}
if x < 1.4148135358670568e45Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Applied rewrites63.6%
if 1.4148135358670568e45 < x Initial program 94.3%
Taylor expanded in y around inf
Applied rewrites63.1%
Taylor expanded in x around -inf
Applied rewrites34.7%
Applied rewrites28.4%
Taylor expanded in x around 0
Applied rewrites34.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x 8.10976389826166e-108)
(/
(fma
(fma 0.0007936500793651 z -0.0027777777777778)
z
0.083333333333333)
x)
(if (<= x 1.4148135358670568e+45)
(* (+ 0.0007936500793651 y) (* z (/ z x)))
(* -1.0 (* x (- 1.0 (log x)))))))double code(double x, double y, double z) {
double tmp;
if (x <= 8.10976389826166e-108) {
tmp = fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x;
} else if (x <= 1.4148135358670568e+45) {
tmp = (0.0007936500793651 + y) * (z * (z / x));
} else {
tmp = -1.0 * (x * (1.0 - log(x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 8.10976389826166e-108) tmp = Float64(fma(fma(0.0007936500793651, z, -0.0027777777777778), z, 0.083333333333333) / x); elseif (x <= 1.4148135358670568e+45) tmp = Float64(Float64(0.0007936500793651 + y) * Float64(z * Float64(z / x))); else tmp = Float64(-1.0 * Float64(x * Float64(1.0 - log(x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 8.10976389826166e-108], N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 1.4148135358670568e+45], N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(x * N[(1.0 - N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp_1 = IF (x <= (1414813535867056792625653556705392199183892480)) THEN (((793650079365100014940070938251892584958113729953765869140625e-63) + y) * (z * (z / x))) ELSE ((-1) * (x * ((1) - (ln(x))))) ENDIF IN LET tmp = IF (x <= (8109763898261660412946910755716538958125293812642230663278428361947358144455511608344208635421273341575704082857342453732978575428784592471495045829813239624306520375042532561379870168004990773597135235046705894650266191884615767028297935073940944297610973500768649646630592542351223528385162353515625e-408)) THEN ((((((793650079365100014940070938251892584958113729953765869140625e-63) * z) + (-2777777777777800001512975569539776188321411609649658203125e-60)) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq 8.10976389826166 \cdot 10^{-108}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{elif}\;x \leq 1.4148135358670568 \cdot 10^{+45}:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(x \cdot \left(1 - \log x\right)\right)\\
\end{array}
if x < 8.1097638982616604e-108Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in y around 0
Applied rewrites47.6%
Applied rewrites47.6%
if 8.1097638982616604e-108 < x < 1.4148135358670568e45Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites42.3%
Applied rewrites44.7%
if 1.4148135358670568e45 < x Initial program 94.3%
Taylor expanded in y around inf
Applied rewrites63.1%
Taylor expanded in x around -inf
Applied rewrites34.7%
Applied rewrites28.4%
Taylor expanded in x around 0
Applied rewrites34.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
(t_1 (* (+ 0.0007936500793651 y) (* z (/ z x)))))
(if (<= t_0 -2e+16)
t_1
(if (<= t_0 5e-15) (/ 1.0 (* x (/ 1.0 0.083333333333333))) t_1))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = (0.0007936500793651 + y) * (z * (z / x));
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 5e-15) {
tmp = 1.0 / (x * (1.0 / 0.083333333333333));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
t_1 = (0.0007936500793651d0 + y) * (z * (z / x))
if (t_0 <= (-2d+16)) then
tmp = t_1
else if (t_0 <= 5d-15) then
tmp = 1.0d0 / (x * (1.0d0 / 0.083333333333333d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = (0.0007936500793651 + y) * (z * (z / x));
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 5e-15) {
tmp = 1.0 / (x * (1.0 / 0.083333333333333));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z t_1 = (0.0007936500793651 + y) * (z * (z / x)) tmp = 0 if t_0 <= -2e+16: tmp = t_1 elif t_0 <= 5e-15: tmp = 1.0 / (x * (1.0 / 0.083333333333333)) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) t_1 = Float64(Float64(0.0007936500793651 + y) * Float64(z * Float64(z / x))) tmp = 0.0 if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 5e-15) tmp = Float64(1.0 / Float64(x * Float64(1.0 / 0.083333333333333))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z; t_1 = (0.0007936500793651 + y) * (z * (z / x)); tmp = 0.0; if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 5e-15) tmp = 1.0 / (x * (1.0 / 0.083333333333333)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+16], t$95$1, If[LessEqual[t$95$0, 5e-15], N[(1.0 / N[(x * N[(1.0 / 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET t_1 = (((793650079365100014940070938251892584958113729953765869140625e-63) + y) * (z * (z / x))) IN LET tmp_1 = IF (t_0 <= (49999999999999999940965467727994934856716453645819608908595910179428756237030029296875e-100)) THEN ((1) / (x * ((1) / (8333333333333299564049667651488562114536762237548828125e-56)))) ELSE t_1 ENDIF IN LET tmp = IF (t_0 <= (-2e16)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
t_1 := \left(0.0007936500793651 + y\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-15}:\\
\;\;\;\;\frac{1}{x \cdot \frac{1}{0.083333333333333}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -2e16 or 5e-15 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites42.3%
Applied rewrites44.7%
if -2e16 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 5e-15Initial program 94.3%
Applied rewrites78.8%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
Applied rewrites23.9%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
(if (<= t_0 -2e+16)
(* (/ (* z (+ 0.0007936500793651 y)) x) z)
(if (<= t_0 5e-15)
(/ 1.0 (* x (/ 1.0 0.083333333333333)))
(/ (* (* (+ 0.0007936500793651 y) z) z) x)))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= -2e+16) {
tmp = ((z * (0.0007936500793651 + y)) / x) * z;
} else if (t_0 <= 5e-15) {
tmp = 1.0 / (x * (1.0 / 0.083333333333333));
} else {
tmp = (((0.0007936500793651 + y) * z) * z) / x;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
if (t_0 <= (-2d+16)) then
tmp = ((z * (0.0007936500793651d0 + y)) / x) * z
else if (t_0 <= 5d-15) then
tmp = 1.0d0 / (x * (1.0d0 / 0.083333333333333d0))
else
tmp = (((0.0007936500793651d0 + y) * z) * z) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= -2e+16) {
tmp = ((z * (0.0007936500793651 + y)) / x) * z;
} else if (t_0 <= 5e-15) {
tmp = 1.0 / (x * (1.0 / 0.083333333333333));
} else {
tmp = (((0.0007936500793651 + y) * z) * z) / x;
}
return tmp;
}
def code(x, y, z): t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z tmp = 0 if t_0 <= -2e+16: tmp = ((z * (0.0007936500793651 + y)) / x) * z elif t_0 <= 5e-15: tmp = 1.0 / (x * (1.0 / 0.083333333333333)) else: tmp = (((0.0007936500793651 + y) * z) * z) / x return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) tmp = 0.0 if (t_0 <= -2e+16) tmp = Float64(Float64(Float64(z * Float64(0.0007936500793651 + y)) / x) * z); elseif (t_0 <= 5e-15) tmp = Float64(1.0 / Float64(x * Float64(1.0 / 0.083333333333333))); else tmp = Float64(Float64(Float64(Float64(0.0007936500793651 + y) * z) * z) / x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z; tmp = 0.0; if (t_0 <= -2e+16) tmp = ((z * (0.0007936500793651 + y)) / x) * z; elseif (t_0 <= 5e-15) tmp = 1.0 / (x * (1.0 / 0.083333333333333)); else tmp = (((0.0007936500793651 + y) * z) * z) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+16], N[(N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 5e-15], N[(1.0 / N[(x * N[(1.0 / 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision] / x), $MachinePrecision]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET tmp_1 = IF (t_0 <= (49999999999999999940965467727994934856716453645819608908595910179428756237030029296875e-100)) THEN ((1) / (x * ((1) / (8333333333333299564049667651488562114536762237548828125e-56)))) ELSE (((((793650079365100014940070938251892584958113729953765869140625e-63) + y) * z) * z) / x) ENDIF IN LET tmp = IF (t_0 <= (-2e16)) THEN (((z * ((793650079365100014940070938251892584958113729953765869140625e-63) + y)) / x) * z) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;\frac{z \cdot \left(0.0007936500793651 + y\right)}{x} \cdot z\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-15}:\\
\;\;\;\;\frac{1}{x \cdot \frac{1}{0.083333333333333}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\left(0.0007936500793651 + y\right) \cdot z\right) \cdot z}{x}\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -2e16Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites43.8%
Taylor expanded in x around 0
Applied rewrites44.0%
if -2e16 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 5e-15Initial program 94.3%
Applied rewrites78.8%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
Applied rewrites23.9%
if 5e-15 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites42.3%
Applied rewrites42.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
(t_1 (* (/ (* z (+ 0.0007936500793651 y)) x) z)))
(if (<= t_0 -2e+16)
t_1
(if (<= t_0 5e-15) (/ 1.0 (* x (/ 1.0 0.083333333333333))) t_1))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = ((z * (0.0007936500793651 + y)) / x) * z;
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 5e-15) {
tmp = 1.0 / (x * (1.0 / 0.083333333333333));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
t_1 = ((z * (0.0007936500793651d0 + y)) / x) * z
if (t_0 <= (-2d+16)) then
tmp = t_1
else if (t_0 <= 5d-15) then
tmp = 1.0d0 / (x * (1.0d0 / 0.083333333333333d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = ((z * (0.0007936500793651 + y)) / x) * z;
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 5e-15) {
tmp = 1.0 / (x * (1.0 / 0.083333333333333));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z t_1 = ((z * (0.0007936500793651 + y)) / x) * z tmp = 0 if t_0 <= -2e+16: tmp = t_1 elif t_0 <= 5e-15: tmp = 1.0 / (x * (1.0 / 0.083333333333333)) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) t_1 = Float64(Float64(Float64(z * Float64(0.0007936500793651 + y)) / x) * z) tmp = 0.0 if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 5e-15) tmp = Float64(1.0 / Float64(x * Float64(1.0 / 0.083333333333333))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z; t_1 = ((z * (0.0007936500793651 + y)) / x) * z; tmp = 0.0; if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 5e-15) tmp = 1.0 / (x * (1.0 / 0.083333333333333)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+16], t$95$1, If[LessEqual[t$95$0, 5e-15], N[(1.0 / N[(x * N[(1.0 / 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET t_1 = (((z * ((793650079365100014940070938251892584958113729953765869140625e-63) + y)) / x) * z) IN LET tmp_1 = IF (t_0 <= (49999999999999999940965467727994934856716453645819608908595910179428756237030029296875e-100)) THEN ((1) / (x * ((1) / (8333333333333299564049667651488562114536762237548828125e-56)))) ELSE t_1 ENDIF IN LET tmp = IF (t_0 <= (-2e16)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
t_1 := \frac{z \cdot \left(0.0007936500793651 + y\right)}{x} \cdot z\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-15}:\\
\;\;\;\;\frac{1}{x \cdot \frac{1}{0.083333333333333}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -2e16 or 5e-15 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites43.8%
Taylor expanded in x around 0
Applied rewrites44.0%
if -2e16 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 5e-15Initial program 94.3%
Applied rewrites78.8%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
Applied rewrites23.9%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
(t_1 (* (/ (* y z) x) z)))
(if (<= t_0 -2e+16)
t_1
(if (<= t_0 4000.0)
(/ 1.0 (* x (/ 1.0 0.083333333333333)))
(if (<= t_0 1e+213) t_1 (/ 0.083333333333333 0.0))))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = ((y * z) / x) * z;
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 4000.0) {
tmp = 1.0 / (x * (1.0 / 0.083333333333333));
} else if (t_0 <= 1e+213) {
tmp = t_1;
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
t_1 = ((y * z) / x) * z
if (t_0 <= (-2d+16)) then
tmp = t_1
else if (t_0 <= 4000.0d0) then
tmp = 1.0d0 / (x * (1.0d0 / 0.083333333333333d0))
else if (t_0 <= 1d+213) then
tmp = t_1
else
tmp = 0.083333333333333d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = ((y * z) / x) * z;
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 4000.0) {
tmp = 1.0 / (x * (1.0 / 0.083333333333333));
} else if (t_0 <= 1e+213) {
tmp = t_1;
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
def code(x, y, z): t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z t_1 = ((y * z) / x) * z tmp = 0 if t_0 <= -2e+16: tmp = t_1 elif t_0 <= 4000.0: tmp = 1.0 / (x * (1.0 / 0.083333333333333)) elif t_0 <= 1e+213: tmp = t_1 else: tmp = 0.083333333333333 / 0.0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) t_1 = Float64(Float64(Float64(y * z) / x) * z) tmp = 0.0 if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 4000.0) tmp = Float64(1.0 / Float64(x * Float64(1.0 / 0.083333333333333))); elseif (t_0 <= 1e+213) tmp = t_1; else tmp = Float64(0.083333333333333 / 0.0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z; t_1 = ((y * z) / x) * z; tmp = 0.0; if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 4000.0) tmp = 1.0 / (x * (1.0 / 0.083333333333333)); elseif (t_0 <= 1e+213) tmp = t_1; else tmp = 0.083333333333333 / 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+16], t$95$1, If[LessEqual[t$95$0, 4000.0], N[(1.0 / N[(x * N[(1.0 / 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+213], t$95$1, N[(0.083333333333333 / 0.0), $MachinePrecision]]]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET t_1 = (((y * z) / x) * z) IN LET tmp_2 = IF (t_0 <= (999999999999999984345037526797422397233524775199337052919583787413130412889023223627065756931830180808571031008919677160084252852199641809946030023447952696435527124027376600704816231425231719002378564135125254144)) THEN t_1 ELSE ((8333333333333299564049667651488562114536762237548828125e-56) / (0)) ENDIF IN LET tmp_1 = IF (t_0 <= (4000)) THEN ((1) / (x * ((1) / (8333333333333299564049667651488562114536762237548828125e-56)))) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-2e16)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
t_1 := \frac{y \cdot z}{x} \cdot z\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 4000:\\
\;\;\;\;\frac{1}{x \cdot \frac{1}{0.083333333333333}}\\
\mathbf{elif}\;t\_0 \leq 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{0}\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -2e16 or 4e3 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 9.9999999999999998e212Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites43.8%
Taylor expanded in y around inf
Applied rewrites29.1%
if -2e16 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 4e3Initial program 94.3%
Applied rewrites78.8%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
Applied rewrites23.9%
if 9.9999999999999998e212 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in undef-var around zero
Applied rewrites35.6%
Taylor expanded in z around 0
Applied rewrites26.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z))
(t_1 (* (/ (* y z) x) z)))
(if (<= t_0 -2e+16)
t_1
(if (<= t_0 4000.0)
(/ 1.0 (/ x 0.083333333333333))
(if (<= t_0 1e+213) t_1 (/ 0.083333333333333 0.0))))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = ((y * z) / x) * z;
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 4000.0) {
tmp = 1.0 / (x / 0.083333333333333);
} else if (t_0 <= 1e+213) {
tmp = t_1;
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
t_1 = ((y * z) / x) * z
if (t_0 <= (-2d+16)) then
tmp = t_1
else if (t_0 <= 4000.0d0) then
tmp = 1.0d0 / (x / 0.083333333333333d0)
else if (t_0 <= 1d+213) then
tmp = t_1
else
tmp = 0.083333333333333d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double t_1 = ((y * z) / x) * z;
double tmp;
if (t_0 <= -2e+16) {
tmp = t_1;
} else if (t_0 <= 4000.0) {
tmp = 1.0 / (x / 0.083333333333333);
} else if (t_0 <= 1e+213) {
tmp = t_1;
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
def code(x, y, z): t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z t_1 = ((y * z) / x) * z tmp = 0 if t_0 <= -2e+16: tmp = t_1 elif t_0 <= 4000.0: tmp = 1.0 / (x / 0.083333333333333) elif t_0 <= 1e+213: tmp = t_1 else: tmp = 0.083333333333333 / 0.0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) t_1 = Float64(Float64(Float64(y * z) / x) * z) tmp = 0.0 if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 4000.0) tmp = Float64(1.0 / Float64(x / 0.083333333333333)); elseif (t_0 <= 1e+213) tmp = t_1; else tmp = Float64(0.083333333333333 / 0.0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z; t_1 = ((y * z) / x) * z; tmp = 0.0; if (t_0 <= -2e+16) tmp = t_1; elseif (t_0 <= 4000.0) tmp = 1.0 / (x / 0.083333333333333); elseif (t_0 <= 1e+213) tmp = t_1; else tmp = 0.083333333333333 / 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+16], t$95$1, If[LessEqual[t$95$0, 4000.0], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+213], t$95$1, N[(0.083333333333333 / 0.0), $MachinePrecision]]]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET t_1 = (((y * z) / x) * z) IN LET tmp_2 = IF (t_0 <= (999999999999999984345037526797422397233524775199337052919583787413130412889023223627065756931830180808571031008919677160084252852199641809946030023447952696435527124027376600704816231425231719002378564135125254144)) THEN t_1 ELSE ((8333333333333299564049667651488562114536762237548828125e-56) / (0)) ENDIF IN LET tmp_1 = IF (t_0 <= (4000)) THEN ((1) / (x / (8333333333333299564049667651488562114536762237548828125e-56))) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-2e16)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
t_1 := \frac{y \cdot z}{x} \cdot z\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 4000:\\
\;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\
\mathbf{elif}\;t\_0 \leq 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{0}\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -2e16 or 4e3 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 9.9999999999999998e212Initial program 94.3%
Taylor expanded in z around inf
Applied rewrites42.0%
Applied rewrites42.0%
Applied rewrites43.8%
Taylor expanded in y around inf
Applied rewrites29.1%
if -2e16 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 4e3Initial program 94.3%
Applied rewrites78.8%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
if 9.9999999999999998e212 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in undef-var around zero
Applied rewrites35.6%
Taylor expanded in z around 0
Applied rewrites26.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
(if (<= t_0 -2e+168)
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) 0.0)
(if (<= t_0 2e-36)
(/ 1.0 (/ x 0.083333333333333))
(/ 0.083333333333333 0.0)))))double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= -2e+168) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / 0.0;
} else if (t_0 <= 2e-36) {
tmp = 1.0 / (x / 0.083333333333333);
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z
if (t_0 <= (-2d+168)) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / 0.0d0
else if (t_0 <= 2d-36) then
tmp = 1.0d0 / (x / 0.083333333333333d0)
else
tmp = 0.083333333333333d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= -2e+168) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / 0.0;
} else if (t_0 <= 2e-36) {
tmp = 1.0 / (x / 0.083333333333333);
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
def code(x, y, z): t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z tmp = 0 if t_0 <= -2e+168: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / 0.0 elif t_0 <= 2e-36: tmp = 1.0 / (x / 0.083333333333333) else: tmp = 0.083333333333333 / 0.0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) tmp = 0.0 if (t_0 <= -2e+168) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / 0.0); elseif (t_0 <= 2e-36) tmp = Float64(1.0 / Float64(x / 0.083333333333333)); else tmp = Float64(0.083333333333333 / 0.0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z; tmp = 0.0; if (t_0 <= -2e+168) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / 0.0; elseif (t_0 <= 2e-36) tmp = 1.0 / (x / 0.083333333333333); else tmp = 0.083333333333333 / 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+168], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / 0.0), $MachinePrecision], If[LessEqual[t$95$0, 2e-36], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / 0.0), $MachinePrecision]]]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET t_0 = ((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) IN LET tmp_1 = IF (t_0 <= (199999999999999988207685488455497830081834903144751854848685577351213967183330845199919898109476579239895954742678441107273101806640625e-170)) THEN ((1) / (x / (8333333333333299564049667651488562114536762237548828125e-56))) ELSE ((8333333333333299564049667651488562114536762237548828125e-56) / (0)) ENDIF IN LET tmp = IF (t_0 <= (-1999999999999999867720989669485949124743900432860663037223385644615401293399207295251384865191691894341829109199397042951078761626889625586558917010807457234988770000896)) THEN (((8333333333333299564049667651488562114536762237548828125e-56) + (z * (-2777777777777800001512975569539776188321411609649658203125e-60))) / (0)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+168}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{0}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{0}\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1.9999999999999999e168Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in undef-var around zero
Applied rewrites35.6%
Taylor expanded in z around 0
Applied rewrites19.4%
if -1.9999999999999999e168 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.9999999999999999e-36Initial program 94.3%
Applied rewrites78.8%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
if 1.9999999999999999e-36 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in undef-var around zero
Applied rewrites35.6%
Taylor expanded in z around 0
Applied rewrites26.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<=
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
2e-36)
(/ (fma -0.0027777777777778 z 0.083333333333333) x)
(/ 0.083333333333333 0.0)))double code(double x, double y, double z) {
double tmp;
if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2e-36) {
tmp = fma(-0.0027777777777778, z, 0.083333333333333) / x;
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2e-36) tmp = Float64(fma(-0.0027777777777778, z, 0.083333333333333) / x); else tmp = Float64(0.083333333333333 / 0.0); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision], 2e-36], N[(N[(-0.0027777777777778 * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(0.083333333333333 / 0.0), $MachinePrecision]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp = IF (((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) <= (199999999999999988207685488455497830081834903144751854848685577351213967183330845199919898109476579239895954742678441107273101806640625e-170)) THEN ((((-2777777777777800001512975569539776188321411609649658203125e-60) * z) + (8333333333333299564049667651488562114536762237548828125e-56)) / x) ELSE ((8333333333333299564049667651488562114536762237548828125e-56) / (0)) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.0027777777777778, z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{0}\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.9999999999999999e-36Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites29.9%
Applied rewrites29.9%
if 1.9999999999999999e-36 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in undef-var around zero
Applied rewrites35.6%
Taylor expanded in z around 0
Applied rewrites26.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<=
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
2.0770422066643692e-35)
(/ 1.0 (/ x 0.083333333333333))
(/ 0.083333333333333 0.0)))double code(double x, double y, double z) {
double tmp;
if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35) {
tmp = 1.0 / (x / 0.083333333333333);
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) <= 2.0770422066643692d-35) then
tmp = 1.0d0 / (x / 0.083333333333333d0)
else
tmp = 0.083333333333333d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35) {
tmp = 1.0 / (x / 0.083333333333333);
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35: tmp = 1.0 / (x / 0.083333333333333) else: tmp = 0.083333333333333 / 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35) tmp = Float64(1.0 / Float64(x / 0.083333333333333)); else tmp = Float64(0.083333333333333 / 0.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35) tmp = 1.0 / (x / 0.083333333333333); else tmp = 0.083333333333333 / 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision], 2.0770422066643692e-35], N[(1.0 / N[(x / 0.083333333333333), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / 0.0), $MachinePrecision]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp = IF (((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) <= (207704220666436917585371079448996920778888835289299955399166092320823273170231741241895345555235063983445797930471599102020263671875e-166)) THEN ((1) / (x / (8333333333333299564049667651488562114536762237548828125e-56))) ELSE ((8333333333333299564049667651488562114536762237548828125e-56) / (0)) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z \leq 2.0770422066643692 \cdot 10^{-35}:\\
\;\;\;\;\frac{1}{\frac{x}{0.083333333333333}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{0}\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 2.0770422066643692e-35Initial program 94.3%
Applied rewrites78.8%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
if 2.0770422066643692e-35 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in undef-var around zero
Applied rewrites35.6%
Taylor expanded in z around 0
Applied rewrites26.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<=
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
2.0770422066643692e-35)
(/ 0.083333333333333 x)
(/ 0.083333333333333 0.0)))double code(double x, double y, double z) {
double tmp;
if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35) {
tmp = 0.083333333333333 / x;
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) <= 2.0770422066643692d-35) then
tmp = 0.083333333333333d0 / x
else
tmp = 0.083333333333333d0 / 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35) {
tmp = 0.083333333333333 / x;
} else {
tmp = 0.083333333333333 / 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35: tmp = 0.083333333333333 / x else: tmp = 0.083333333333333 / 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35) tmp = Float64(0.083333333333333 / x); else tmp = Float64(0.083333333333333 / 0.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) <= 2.0770422066643692e-35) tmp = 0.083333333333333 / x; else tmp = 0.083333333333333 / 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision], 2.0770422066643692e-35], N[(0.083333333333333 / x), $MachinePrecision], N[(0.083333333333333 / 0.0), $MachinePrecision]]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = LET tmp = IF (((((y + (793650079365100014940070938251892584958113729953765869140625e-63)) * z) - (2777777777777800001512975569539776188321411609649658203125e-60)) * z) <= (207704220666436917585371079448996920778888835289299955399166092320823273170231741241895345555235063983445797930471599102020263671875e-166)) THEN ((8333333333333299564049667651488562114536762237548828125e-56) / x) ELSE ((8333333333333299564049667651488562114536762237548828125e-56) / (0)) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z \leq 2.0770422066643692 \cdot 10^{-35}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{0}\\
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 2.0770422066643692e-35Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
if 2.0770422066643692e-35 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in undef-var around zero
Applied rewrites35.6%
Taylor expanded in z around 0
Applied rewrites26.3%
(FPCore (x y z) :precision binary64 :pre TRUE (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
f(x, y, z): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf] code: THEORY BEGIN f(x, y, z: real): real = (8333333333333299564049667651488562114536762237548828125e-56) / x END code
\frac{0.083333333333333}{x}
Initial program 94.3%
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites63.6%
Taylor expanded in z around 0
Applied rewrites23.8%
herbie shell --seed 2026092
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))