
(FPCore (x y z) :precision binary64 :pre TRUE (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
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 + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $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 = x + (((y - x) * (6)) * (((2) / (3)) - z)) END code
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 :pre TRUE (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
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 + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $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 = x + (((y - x) * (6)) * (((2) / (3)) - z)) END code
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
(FPCore (x y z) :precision binary64 :pre TRUE (fma -6.0 (* z (- y x)) (fma -4.0 (- x y) x)))
double code(double x, double y, double z) {
return fma(-6.0, (z * (y - x)), fma(-4.0, (x - y), x));
}
function code(x, y, z) return fma(-6.0, Float64(z * Float64(y - x)), fma(-4.0, Float64(x - y), x)) end
code[x_, y_, z_] := N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x - y), $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 = ((-6) * (z * (y - x))) + (((-4) * (x - y)) + x) END code
\mathsf{fma}\left(-6, z \cdot \left(y - x\right), \mathsf{fma}\left(-4, x - y, x\right)\right)
Initial program 99.5%
Applied rewrites99.8%
(FPCore (x y z) :precision binary64 :pre TRUE (fma (- x y) (fma z 6.0 -4.0) x))
double code(double x, double y, double z) {
return fma((x - y), fma(z, 6.0, -4.0), x);
}
function code(x, y, z) return fma(Float64(x - y), fma(z, 6.0, -4.0), x) end
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] * N[(z * 6.0 + -4.0), $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 = ((x - y) * ((z * (6)) + (-4))) + x END code
\mathsf{fma}\left(x - y, \mathsf{fma}\left(z, 6, -4\right), x\right)
Initial program 99.5%
Applied rewrites99.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (- (/ 2.0 3.0) z)))
(if (<= t_0 -1000.0)
(* z (* (- x y) 6.0))
(if (<= t_0 1.0)
(- (fma 4.0 y x) (* 4.0 x))
(* z (fma -6.0 y (* 6.0 x)))))))double code(double x, double y, double z) {
double t_0 = (2.0 / 3.0) - z;
double tmp;
if (t_0 <= -1000.0) {
tmp = z * ((x - y) * 6.0);
} else if (t_0 <= 1.0) {
tmp = fma(4.0, y, x) - (4.0 * x);
} else {
tmp = z * fma(-6.0, y, (6.0 * x));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(2.0 / 3.0) - z) tmp = 0.0 if (t_0 <= -1000.0) tmp = Float64(z * Float64(Float64(x - y) * 6.0)); elseif (t_0 <= 1.0) tmp = Float64(fma(4.0, y, x) - Float64(4.0 * x)); else tmp = Float64(z * fma(-6.0, y, Float64(6.0 * x))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], N[(z * N[(N[(x - y), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[(N[(4.0 * y + x), $MachinePrecision] - N[(4.0 * x), $MachinePrecision]), $MachinePrecision], N[(z * N[(-6.0 * y + N[(6.0 * x), $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 = (((2) / (3)) - z) IN LET tmp_1 = IF (t_0 <= (1)) THEN ((((4) * y) + x) - ((4) * x)) ELSE (z * (((-6) * y) + ((6) * x))) ENDIF IN LET tmp = IF (t_0 <= (-1000)) THEN (z * ((x - y) * (6))) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{2}{3} - z\\
\mathbf{if}\;t\_0 \leq -1000:\\
\;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\
\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\mathsf{fma}\left(4, y, x\right) - 4 \cdot x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right)\\
\end{array}
if (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < -1e3Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Applied rewrites50.7%
if -1e3 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < 1Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around 0
Applied rewrites50.9%
Applied rewrites50.9%
if 1 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (- (/ 2.0 3.0) z)))
(if (<= t_0 -1000.0)
(* z (* (- x y) 6.0))
(if (<= t_0 1.0)
(- (fma 4.0 y x) (* 4.0 x))
(* 6.0 (* z (- x y)))))))double code(double x, double y, double z) {
double t_0 = (2.0 / 3.0) - z;
double tmp;
if (t_0 <= -1000.0) {
tmp = z * ((x - y) * 6.0);
} else if (t_0 <= 1.0) {
tmp = fma(4.0, y, x) - (4.0 * x);
} else {
tmp = 6.0 * (z * (x - y));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(2.0 / 3.0) - z) tmp = 0.0 if (t_0 <= -1000.0) tmp = Float64(z * Float64(Float64(x - y) * 6.0)); elseif (t_0 <= 1.0) tmp = Float64(fma(4.0, y, x) - Float64(4.0 * x)); else tmp = Float64(6.0 * Float64(z * Float64(x - y))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], N[(z * N[(N[(x - y), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[(N[(4.0 * y + x), $MachinePrecision] - N[(4.0 * x), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(z * N[(x - y), $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 = (((2) / (3)) - z) IN LET tmp_1 = IF (t_0 <= (1)) THEN ((((4) * y) + x) - ((4) * x)) ELSE ((6) * (z * (x - y))) ENDIF IN LET tmp = IF (t_0 <= (-1000)) THEN (z * ((x - y) * (6))) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{2}{3} - z\\
\mathbf{if}\;t\_0 \leq -1000:\\
\;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\
\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\mathsf{fma}\left(4, y, x\right) - 4 \cdot x\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(z \cdot \left(x - y\right)\right)\\
\end{array}
if (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < -1e3Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Applied rewrites50.7%
if -1e3 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < 1Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around 0
Applied rewrites50.9%
Applied rewrites50.9%
if 1 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) Initial program 99.5%
Applied rewrites99.5%
Taylor expanded in z around inf
Applied rewrites50.6%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (- (/ 2.0 3.0) z)))
(if (<= t_0 -1000.0)
(* z (* (- x y) 6.0))
(if (<= t_0 1.0) (fma 4.0 (- y x) x) (* 6.0 (* z (- x y)))))))double code(double x, double y, double z) {
double t_0 = (2.0 / 3.0) - z;
double tmp;
if (t_0 <= -1000.0) {
tmp = z * ((x - y) * 6.0);
} else if (t_0 <= 1.0) {
tmp = fma(4.0, (y - x), x);
} else {
tmp = 6.0 * (z * (x - y));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(2.0 / 3.0) - z) tmp = 0.0 if (t_0 <= -1000.0) tmp = Float64(z * Float64(Float64(x - y) * 6.0)); elseif (t_0 <= 1.0) tmp = fma(4.0, Float64(y - x), x); else tmp = Float64(6.0 * Float64(z * Float64(x - y))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], N[(z * N[(N[(x - y), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[(4.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(6.0 * N[(z * N[(x - y), $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 = (((2) / (3)) - z) IN LET tmp_1 = IF (t_0 <= (1)) THEN (((4) * (y - x)) + x) ELSE ((6) * (z * (x - y))) ENDIF IN LET tmp = IF (t_0 <= (-1000)) THEN (z * ((x - y) * (6))) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{2}{3} - z\\
\mathbf{if}\;t\_0 \leq -1000:\\
\;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\
\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(z \cdot \left(x - y\right)\right)\\
\end{array}
if (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < -1e3Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Applied rewrites50.7%
if -1e3 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < 1Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around 0
Applied rewrites50.9%
Applied rewrites50.9%
if 1 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) Initial program 99.5%
Applied rewrites99.5%
Taylor expanded in z around inf
Applied rewrites50.6%
(FPCore (x y z) :precision binary64 :pre TRUE (let* ((t_0 (- (/ 2.0 3.0) z)) (t_1 (* 6.0 (* z (- x y))))) (if (<= t_0 -1000.0) t_1 (if (<= t_0 1.0) (fma 4.0 (- y x) x) t_1))))
double code(double x, double y, double z) {
double t_0 = (2.0 / 3.0) - z;
double t_1 = 6.0 * (z * (x - y));
double tmp;
if (t_0 <= -1000.0) {
tmp = t_1;
} else if (t_0 <= 1.0) {
tmp = fma(4.0, (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(2.0 / 3.0) - z) t_1 = Float64(6.0 * Float64(z * Float64(x - y))) tmp = 0.0 if (t_0 <= -1000.0) tmp = t_1; elseif (t_0 <= 1.0) tmp = fma(4.0, Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], t$95$1, If[LessEqual[t$95$0, 1.0], N[(4.0 * N[(y - x), $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 = (((2) / (3)) - z) IN LET t_1 = ((6) * (z * (x - y))) IN LET tmp_1 = IF (t_0 <= (1)) THEN (((4) * (y - x)) + x) ELSE t_1 ENDIF IN LET tmp = IF (t_0 <= (-1000)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{2}{3} - z\\
t_1 := 6 \cdot \left(z \cdot \left(x - y\right)\right)\\
\mathbf{if}\;t\_0 \leq -1000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < -1e3 or 1 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) Initial program 99.5%
Applied rewrites99.5%
Taylor expanded in z around inf
Applied rewrites50.6%
if -1e3 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < 1Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around 0
Applied rewrites50.9%
Applied rewrites50.9%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* (fma -6.0 z 4.0) y)))
(if (<= y -3.1789006437251225e-121)
t_0
(if (<= y 60174299.512866564) (* (fma z 6.0 -3.0) x) t_0))))double code(double x, double y, double z) {
double t_0 = fma(-6.0, z, 4.0) * y;
double tmp;
if (y <= -3.1789006437251225e-121) {
tmp = t_0;
} else if (y <= 60174299.512866564) {
tmp = fma(z, 6.0, -3.0) * x;
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(fma(-6.0, z, 4.0) * y) tmp = 0.0 if (y <= -3.1789006437251225e-121) tmp = t_0; elseif (y <= 60174299.512866564) tmp = Float64(fma(z, 6.0, -3.0) * x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-6.0 * z + 4.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -3.1789006437251225e-121], t$95$0, If[LessEqual[y, 60174299.512866564], N[(N[(z * 6.0 + -3.0), $MachinePrecision] * x), $MachinePrecision], t$95$0]]]
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 = ((((-6) * z) + (4)) * y) IN LET tmp_1 = IF (y <= (60174299512866564095020294189453125e-27)) THEN (((z * (6)) + (-3)) * x) ELSE t_0 ENDIF IN LET tmp = IF (y <= (-317890064372512247688549505960289038327131994036841110540962906769404769208261861273859496188680827898195998971673293543571635771856326931903294151350825970828578785356851668594094472897821047154192757309636993462550938766457344488919782973849942040385314528344684298108715298018078622305248627510909642523984075523912906646728515625e-453)) THEN t_0 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \mathsf{fma}\left(-6, z, 4\right) \cdot y\\
\mathbf{if}\;y \leq -3.1789006437251225 \cdot 10^{-121}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 60174299.512866564:\\
\;\;\;\;\mathsf{fma}\left(z, 6, -3\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if y < -3.1789006437251225e-121 or 60174299.512866564 < y Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites50.8%
Applied rewrites50.8%
if -3.1789006437251225e-121 < y < 60174299.512866564Initial program 99.5%
Applied rewrites99.8%
Taylor expanded in x around inf
Applied rewrites52.7%
Applied rewrites52.7%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= z -28165673201.033638)
(* 6.0 (* x z))
(if (<= z 1718.3088900824791)
(fma 4.0 (- y x) x)
(if (<= z 1.69063164059008e+58)
(* z (* x 6.0))
(* -6.0 (* y z))))))double code(double x, double y, double z) {
double tmp;
if (z <= -28165673201.033638) {
tmp = 6.0 * (x * z);
} else if (z <= 1718.3088900824791) {
tmp = fma(4.0, (y - x), x);
} else if (z <= 1.69063164059008e+58) {
tmp = z * (x * 6.0);
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -28165673201.033638) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= 1718.3088900824791) tmp = fma(4.0, Float64(y - x), x); elseif (z <= 1.69063164059008e+58) tmp = Float64(z * Float64(x * 6.0)); else tmp = Float64(-6.0 * Float64(y * z)); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -28165673201.033638], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1718.3088900824791], N[(4.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.69063164059008e+58], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(y * z), $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_2 = IF (z <= (16906316405900798750126587757919644890122804940982886334464)) THEN (z * (x * (6))) ELSE ((-6) * (y * z)) ENDIF IN LET tmp_1 = IF (z <= (171830889008247913807281292974948883056640625e-41)) THEN (((4) * (y - x)) + x) ELSE tmp_2 ENDIF IN LET tmp = IF (z <= (-2816567320103363800048828125e-17)) THEN ((6) * (x * z)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -28165673201.033638:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq 1718.3088900824791:\\
\;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\
\mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\end{array}
if z < -28165673201.033638Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Applied rewrites50.7%
Taylor expanded in x around inf
Applied rewrites27.9%
if -28165673201.033638 < z < 1718.3088900824791Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around 0
Applied rewrites50.9%
Applied rewrites50.9%
if 1718.3088900824791 < z < 1.6906316405900799e58Initial program 99.5%
Taylor expanded in z around inf
Applied rewrites79.4%
Taylor expanded in x around inf
Applied rewrites42.8%
Taylor expanded in z around inf
Applied rewrites27.9%
if 1.6906316405900799e58 < z Initial program 99.5%
Applied rewrites99.5%
Taylor expanded in z around inf
Applied rewrites50.6%
Taylor expanded in x around 0
Applied rewrites27.0%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= z -28165673201.033638)
(* 6.0 (* x z))
(if (<= z 7.845250112058621e-9)
(fma 4.0 (- y x) x)
(* (fma -6.0 z 4.0) y))))double code(double x, double y, double z) {
double tmp;
if (z <= -28165673201.033638) {
tmp = 6.0 * (x * z);
} else if (z <= 7.845250112058621e-9) {
tmp = fma(4.0, (y - x), x);
} else {
tmp = fma(-6.0, z, 4.0) * y;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -28165673201.033638) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= 7.845250112058621e-9) tmp = fma(4.0, Float64(y - x), x); else tmp = Float64(fma(-6.0, z, 4.0) * y); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -28165673201.033638], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.845250112058621e-9], N[(4.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(-6.0 * z + 4.0), $MachinePrecision] * y), $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 (z <= (78452501120586211901078397558915999976392185999429784715175628662109375e-79)) THEN (((4) * (y - x)) + x) ELSE ((((-6) * z) + (4)) * y) ENDIF IN LET tmp = IF (z <= (-2816567320103363800048828125e-17)) THEN ((6) * (x * z)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -28165673201.033638:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq 7.845250112058621 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-6, z, 4\right) \cdot y\\
\end{array}
if z < -28165673201.033638Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Applied rewrites50.7%
Taylor expanded in x around inf
Applied rewrites27.9%
if -28165673201.033638 < z < 7.8452501120586212e-9Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around 0
Applied rewrites50.9%
Applied rewrites50.9%
if 7.8452501120586212e-9 < z Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites50.8%
Applied rewrites50.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= z -1.3998094315248038e-12)
(* 6.0 (* x z))
(if (<= z -1.050551895330471e-127)
(* y 4.0)
(if (<= z 1718.3088900824791)
(* x -3.0)
(if (<= z 1.69063164059008e+58)
(* z (* x 6.0))
(* -6.0 (* y z)))))))double code(double x, double y, double z) {
double tmp;
if (z <= -1.3998094315248038e-12) {
tmp = 6.0 * (x * z);
} else if (z <= -1.050551895330471e-127) {
tmp = y * 4.0;
} else if (z <= 1718.3088900824791) {
tmp = x * -3.0;
} else if (z <= 1.69063164059008e+58) {
tmp = z * (x * 6.0);
} else {
tmp = -6.0 * (y * z);
}
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 (z <= (-1.3998094315248038d-12)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-1.050551895330471d-127)) then
tmp = y * 4.0d0
else if (z <= 1718.3088900824791d0) then
tmp = x * (-3.0d0)
else if (z <= 1.69063164059008d+58) then
tmp = z * (x * 6.0d0)
else
tmp = (-6.0d0) * (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.3998094315248038e-12) {
tmp = 6.0 * (x * z);
} else if (z <= -1.050551895330471e-127) {
tmp = y * 4.0;
} else if (z <= 1718.3088900824791) {
tmp = x * -3.0;
} else if (z <= 1.69063164059008e+58) {
tmp = z * (x * 6.0);
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.3998094315248038e-12: tmp = 6.0 * (x * z) elif z <= -1.050551895330471e-127: tmp = y * 4.0 elif z <= 1718.3088900824791: tmp = x * -3.0 elif z <= 1.69063164059008e+58: tmp = z * (x * 6.0) else: tmp = -6.0 * (y * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.3998094315248038e-12) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -1.050551895330471e-127) tmp = Float64(y * 4.0); elseif (z <= 1718.3088900824791) tmp = Float64(x * -3.0); elseif (z <= 1.69063164059008e+58) tmp = Float64(z * Float64(x * 6.0)); else tmp = Float64(-6.0 * Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.3998094315248038e-12) tmp = 6.0 * (x * z); elseif (z <= -1.050551895330471e-127) tmp = y * 4.0; elseif (z <= 1718.3088900824791) tmp = x * -3.0; elseif (z <= 1.69063164059008e+58) tmp = z * (x * 6.0); else tmp = -6.0 * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.3998094315248038e-12], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.050551895330471e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1718.3088900824791], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.69063164059008e+58], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(y * z), $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_3 = IF (z <= (16906316405900798750126587757919644890122804940982886334464)) THEN (z * (x * (6))) ELSE ((-6) * (y * z)) ENDIF IN LET tmp_2 = IF (z <= (171830889008247913807281292974948883056640625e-41)) THEN (x * (-3)) ELSE tmp_3 ENDIF IN LET tmp_1 = IF (z <= (-1050551895330471047199608142206847942357732978279208248232389758731369032790351714128791919766738354418709601815561898420283195865764132608462302944480244647500466272304783702797228706208907219767786163417990948949007926800056425776679222292577463792620097198985539428130018450260037434253250238048736143504913176371928784647025167942047119140625e-472)) THEN (y * (4)) ELSE tmp_2 ENDIF IN LET tmp = IF (z <= (-13998094315248038436093144834835577130192907358008369556046091020107269287109375e-91)) THEN ((6) * (x * z)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1718.3088900824791:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\end{array}
if z < -1.3998094315248038e-12Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Applied rewrites50.7%
Taylor expanded in x around inf
Applied rewrites27.9%
if -1.3998094315248038e-12 < z < -1.050551895330471e-127Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites50.8%
Taylor expanded in z around 0
Applied rewrites26.0%
if -1.050551895330471e-127 < z < 1718.3088900824791Initial program 99.5%
Taylor expanded in x around inf
Applied rewrites52.7%
Taylor expanded in z around 0
Applied rewrites26.9%
if 1718.3088900824791 < z < 1.6906316405900799e58Initial program 99.5%
Taylor expanded in z around inf
Applied rewrites79.4%
Taylor expanded in x around inf
Applied rewrites42.8%
Taylor expanded in z around inf
Applied rewrites27.9%
if 1.6906316405900799e58 < z Initial program 99.5%
Applied rewrites99.5%
Taylor expanded in z around inf
Applied rewrites50.6%
Taylor expanded in x around 0
Applied rewrites27.0%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* z (* x 6.0))))
(if (<= z -1.3998094315248038e-12)
t_0
(if (<= z -1.050551895330471e-127)
(* y 4.0)
(if (<= z 1718.3088900824791)
(* x -3.0)
(if (<= z 1.69063164059008e+58) t_0 (* -6.0 (* y z))))))))double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -1.3998094315248038e-12) {
tmp = t_0;
} else if (z <= -1.050551895330471e-127) {
tmp = y * 4.0;
} else if (z <= 1718.3088900824791) {
tmp = x * -3.0;
} else if (z <= 1.69063164059008e+58) {
tmp = t_0;
} else {
tmp = -6.0 * (y * z);
}
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 = z * (x * 6.0d0)
if (z <= (-1.3998094315248038d-12)) then
tmp = t_0
else if (z <= (-1.050551895330471d-127)) then
tmp = y * 4.0d0
else if (z <= 1718.3088900824791d0) then
tmp = x * (-3.0d0)
else if (z <= 1.69063164059008d+58) then
tmp = t_0
else
tmp = (-6.0d0) * (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -1.3998094315248038e-12) {
tmp = t_0;
} else if (z <= -1.050551895330471e-127) {
tmp = y * 4.0;
} else if (z <= 1718.3088900824791) {
tmp = x * -3.0;
} else if (z <= 1.69063164059008e+58) {
tmp = t_0;
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
def code(x, y, z): t_0 = z * (x * 6.0) tmp = 0 if z <= -1.3998094315248038e-12: tmp = t_0 elif z <= -1.050551895330471e-127: tmp = y * 4.0 elif z <= 1718.3088900824791: tmp = x * -3.0 elif z <= 1.69063164059008e+58: tmp = t_0 else: tmp = -6.0 * (y * z) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(x * 6.0)) tmp = 0.0 if (z <= -1.3998094315248038e-12) tmp = t_0; elseif (z <= -1.050551895330471e-127) tmp = Float64(y * 4.0); elseif (z <= 1718.3088900824791) tmp = Float64(x * -3.0); elseif (z <= 1.69063164059008e+58) tmp = t_0; else tmp = Float64(-6.0 * Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (x * 6.0); tmp = 0.0; if (z <= -1.3998094315248038e-12) tmp = t_0; elseif (z <= -1.050551895330471e-127) tmp = y * 4.0; elseif (z <= 1718.3088900824791) tmp = x * -3.0; elseif (z <= 1.69063164059008e+58) tmp = t_0; else tmp = -6.0 * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3998094315248038e-12], t$95$0, If[LessEqual[z, -1.050551895330471e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1718.3088900824791], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.69063164059008e+58], t$95$0, N[(-6.0 * N[(y * z), $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 * (x * (6))) IN LET tmp_3 = IF (z <= (16906316405900798750126587757919644890122804940982886334464)) THEN t_0 ELSE ((-6) * (y * z)) ENDIF IN LET tmp_2 = IF (z <= (171830889008247913807281292974948883056640625e-41)) THEN (x * (-3)) ELSE tmp_3 ENDIF IN LET tmp_1 = IF (z <= (-1050551895330471047199608142206847942357732978279208248232389758731369032790351714128791919766738354418709601815561898420283195865764132608462302944480244647500466272304783702797228706208907219767786163417990948949007926800056425776679222292577463792620097198985539428130018450260037434253250238048736143504913176371928784647025167942047119140625e-472)) THEN (y * (4)) ELSE tmp_2 ENDIF IN LET tmp = IF (z <= (-13998094315248038436093144834835577130192907358008369556046091020107269287109375e-91)) THEN t_0 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := z \cdot \left(x \cdot 6\right)\\
\mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1718.3088900824791:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\end{array}
if z < -1.3998094315248038e-12 or 1718.3088900824791 < z < 1.6906316405900799e58Initial program 99.5%
Taylor expanded in z around inf
Applied rewrites79.4%
Taylor expanded in x around inf
Applied rewrites42.8%
Taylor expanded in z around inf
Applied rewrites27.9%
if -1.3998094315248038e-12 < z < -1.050551895330471e-127Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites50.8%
Taylor expanded in z around 0
Applied rewrites26.0%
if -1.050551895330471e-127 < z < 1718.3088900824791Initial program 99.5%
Taylor expanded in x around inf
Applied rewrites52.7%
Taylor expanded in z around 0
Applied rewrites26.9%
if 1.6906316405900799e58 < z Initial program 99.5%
Applied rewrites99.5%
Taylor expanded in z around inf
Applied rewrites50.6%
Taylor expanded in x around 0
Applied rewrites27.0%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* z (* x 6.0))))
(if (<= z -1.3998094315248038e-12)
t_0
(if (<= z -1.050551895330471e-127)
(* y 4.0)
(if (<= z 1718.3088900824791)
(* x -3.0)
(if (<= z 1.69063164059008e+58) t_0 (* y (* z -6.0))))))))double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -1.3998094315248038e-12) {
tmp = t_0;
} else if (z <= -1.050551895330471e-127) {
tmp = y * 4.0;
} else if (z <= 1718.3088900824791) {
tmp = x * -3.0;
} else if (z <= 1.69063164059008e+58) {
tmp = t_0;
} else {
tmp = y * (z * -6.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 = z * (x * 6.0d0)
if (z <= (-1.3998094315248038d-12)) then
tmp = t_0
else if (z <= (-1.050551895330471d-127)) then
tmp = y * 4.0d0
else if (z <= 1718.3088900824791d0) then
tmp = x * (-3.0d0)
else if (z <= 1.69063164059008d+58) then
tmp = t_0
else
tmp = y * (z * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (x * 6.0);
double tmp;
if (z <= -1.3998094315248038e-12) {
tmp = t_0;
} else if (z <= -1.050551895330471e-127) {
tmp = y * 4.0;
} else if (z <= 1718.3088900824791) {
tmp = x * -3.0;
} else if (z <= 1.69063164059008e+58) {
tmp = t_0;
} else {
tmp = y * (z * -6.0);
}
return tmp;
}
def code(x, y, z): t_0 = z * (x * 6.0) tmp = 0 if z <= -1.3998094315248038e-12: tmp = t_0 elif z <= -1.050551895330471e-127: tmp = y * 4.0 elif z <= 1718.3088900824791: tmp = x * -3.0 elif z <= 1.69063164059008e+58: tmp = t_0 else: tmp = y * (z * -6.0) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(x * 6.0)) tmp = 0.0 if (z <= -1.3998094315248038e-12) tmp = t_0; elseif (z <= -1.050551895330471e-127) tmp = Float64(y * 4.0); elseif (z <= 1718.3088900824791) tmp = Float64(x * -3.0); elseif (z <= 1.69063164059008e+58) tmp = t_0; else tmp = Float64(y * Float64(z * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (x * 6.0); tmp = 0.0; if (z <= -1.3998094315248038e-12) tmp = t_0; elseif (z <= -1.050551895330471e-127) tmp = y * 4.0; elseif (z <= 1718.3088900824791) tmp = x * -3.0; elseif (z <= 1.69063164059008e+58) tmp = t_0; else tmp = y * (z * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3998094315248038e-12], t$95$0, If[LessEqual[z, -1.050551895330471e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1718.3088900824791], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.69063164059008e+58], t$95$0, N[(y * N[(z * -6.0), $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 * (x * (6))) IN LET tmp_3 = IF (z <= (16906316405900798750126587757919644890122804940982886334464)) THEN t_0 ELSE (y * (z * (-6))) ENDIF IN LET tmp_2 = IF (z <= (171830889008247913807281292974948883056640625e-41)) THEN (x * (-3)) ELSE tmp_3 ENDIF IN LET tmp_1 = IF (z <= (-1050551895330471047199608142206847942357732978279208248232389758731369032790351714128791919766738354418709601815561898420283195865764132608462302944480244647500466272304783702797228706208907219767786163417990948949007926800056425776679222292577463792620097198985539428130018450260037434253250238048736143504913176371928784647025167942047119140625e-472)) THEN (y * (4)) ELSE tmp_2 ENDIF IN LET tmp = IF (z <= (-13998094315248038436093144834835577130192907358008369556046091020107269287109375e-91)) THEN t_0 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := z \cdot \left(x \cdot 6\right)\\
\mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1718.3088900824791:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\end{array}
if z < -1.3998094315248038e-12 or 1718.3088900824791 < z < 1.6906316405900799e58Initial program 99.5%
Taylor expanded in z around inf
Applied rewrites79.4%
Taylor expanded in x around inf
Applied rewrites42.8%
Taylor expanded in z around inf
Applied rewrites27.9%
if -1.3998094315248038e-12 < z < -1.050551895330471e-127Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites50.8%
Taylor expanded in z around 0
Applied rewrites26.0%
if -1.050551895330471e-127 < z < 1718.3088900824791Initial program 99.5%
Taylor expanded in x around inf
Applied rewrites52.7%
Taylor expanded in z around 0
Applied rewrites26.9%
if 1.6906316405900799e58 < z Initial program 99.5%
Taylor expanded in y around inf
Applied rewrites84.0%
Taylor expanded in z around inf
Applied rewrites44.6%
Taylor expanded in x around 0
Applied rewrites27.0%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* y (* z -6.0))))
(if (<= z -1.3998094315248038e-12)
t_0
(if (<= z -1.050551895330471e-127)
(* y 4.0)
(if (<= z 2.314230314237776e-47)
(* x -3.0)
(if (<= z 6330509882047881.0) (fma 4.0 y x) t_0))))))double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double tmp;
if (z <= -1.3998094315248038e-12) {
tmp = t_0;
} else if (z <= -1.050551895330471e-127) {
tmp = y * 4.0;
} else if (z <= 2.314230314237776e-47) {
tmp = x * -3.0;
} else if (z <= 6330509882047881.0) {
tmp = fma(4.0, y, x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(y * Float64(z * -6.0)) tmp = 0.0 if (z <= -1.3998094315248038e-12) tmp = t_0; elseif (z <= -1.050551895330471e-127) tmp = Float64(y * 4.0); elseif (z <= 2.314230314237776e-47) tmp = Float64(x * -3.0); elseif (z <= 6330509882047881.0) tmp = fma(4.0, y, x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3998094315248038e-12], t$95$0, If[LessEqual[z, -1.050551895330471e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.314230314237776e-47], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6330509882047881.0], N[(4.0 * y + x), $MachinePrecision], t$95$0]]]]]
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 * (z * (-6))) IN LET tmp_3 = IF (z <= (6330509882047881)) THEN (((4) * y) + x) ELSE t_0 ENDIF IN LET tmp_2 = IF (z <= (2314230314237776030740359313533368911826288684043973744061838604739084076876766274501369988877454830434125501196230005780674066073743233573623001575469970703125e-206)) THEN (x * (-3)) ELSE tmp_3 ENDIF IN LET tmp_1 = IF (z <= (-1050551895330471047199608142206847942357732978279208248232389758731369032790351714128791919766738354418709601815561898420283195865764132608462302944480244647500466272304783702797228706208907219767786163417990948949007926800056425776679222292577463792620097198985539428130018450260037434253250238048736143504913176371928784647025167942047119140625e-472)) THEN (y * (4)) ELSE tmp_2 ENDIF IN LET tmp = IF (z <= (-13998094315248038436093144834835577130192907358008369556046091020107269287109375e-91)) THEN t_0 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := y \cdot \left(z \cdot -6\right)\\
\mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.314230314237776 \cdot 10^{-47}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6330509882047881:\\
\;\;\;\;\mathsf{fma}\left(4, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if z < -1.3998094315248038e-12 or 6330509882047881 < z Initial program 99.5%
Taylor expanded in y around inf
Applied rewrites84.0%
Taylor expanded in z around inf
Applied rewrites44.6%
Taylor expanded in x around 0
Applied rewrites27.0%
if -1.3998094315248038e-12 < z < -1.050551895330471e-127Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites50.8%
Taylor expanded in z around 0
Applied rewrites26.0%
if -1.050551895330471e-127 < z < 2.314230314237776e-47Initial program 99.5%
Taylor expanded in x around inf
Applied rewrites52.7%
Taylor expanded in z around 0
Applied rewrites26.9%
if 2.314230314237776e-47 < z < 6330509882047881Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around 0
Applied rewrites50.9%
Applied rewrites50.9%
Taylor expanded in x around 0
Applied rewrites25.7%
(FPCore (x y z) :precision binary64 :pre TRUE (if (<= y -3.1789006437251225e-121) (* y 4.0) (if (<= y 6.850874518106612e+112) (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -3.1789006437251225e-121) {
tmp = y * 4.0;
} else if (y <= 6.850874518106612e+112) {
tmp = x * -3.0;
} else {
tmp = y * 4.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 <= (-3.1789006437251225d-121)) then
tmp = y * 4.0d0
else if (y <= 6.850874518106612d+112) then
tmp = x * (-3.0d0)
else
tmp = y * 4.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -3.1789006437251225e-121) {
tmp = y * 4.0;
} else if (y <= 6.850874518106612e+112) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -3.1789006437251225e-121: tmp = y * 4.0 elif y <= 6.850874518106612e+112: tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -3.1789006437251225e-121) tmp = Float64(y * 4.0); elseif (y <= 6.850874518106612e+112) tmp = Float64(x * -3.0); else tmp = Float64(y * 4.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -3.1789006437251225e-121) tmp = y * 4.0; elseif (y <= 6.850874518106612e+112) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -3.1789006437251225e-121], N[(y * 4.0), $MachinePrecision], If[LessEqual[y, 6.850874518106612e+112], N[(x * -3.0), $MachinePrecision], N[(y * 4.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_1 = IF (y <= (68508745181066123989082494598625973818159535974472370974181792568369187592370785732721671702670460623062078324736)) THEN (x * (-3)) ELSE (y * (4)) ENDIF IN LET tmp = IF (y <= (-317890064372512247688549505960289038327131994036841110540962906769404769208261861273859496188680827898195998971673293543571635771856326931903294151350825970828578785356851668594094472897821047154192757309636993462550938766457344488919782973849942040385314528344684298108715298018078622305248627510909642523984075523912906646728515625e-453)) THEN (y * (4)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;y \leq -3.1789006437251225 \cdot 10^{-121}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;y \leq 6.850874518106612 \cdot 10^{+112}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
if y < -3.1789006437251225e-121 or 6.8508745181066124e112 < y Initial program 99.5%
Applied rewrites98.7%
Taylor expanded in z around inf
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites50.8%
Taylor expanded in z around 0
Applied rewrites26.0%
if -3.1789006437251225e-121 < y < 6.8508745181066124e112Initial program 99.5%
Taylor expanded in x around inf
Applied rewrites52.7%
Taylor expanded in z around 0
Applied rewrites26.9%
(FPCore (x y z) :precision binary64 :pre TRUE (* x -3.0))
double code(double x, double y, double z) {
return x * -3.0;
}
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 * (-3.0d0)
end function
public static double code(double x, double y, double z) {
return x * -3.0;
}
def code(x, y, z): return x * -3.0
function code(x, y, z) return Float64(x * -3.0) end
function tmp = code(x, y, z) tmp = x * -3.0; end
code[x_, y_, z_] := N[(x * -3.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 = x * (-3) END code
x \cdot -3
Initial program 99.5%
Taylor expanded in x around inf
Applied rewrites52.7%
Taylor expanded in z around 0
Applied rewrites26.9%
herbie shell --seed 2026092
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D"
:precision binary64
(+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))