
(FPCore (x y z) :precision binary64 :pre TRUE (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
return x + (((y - x) * 6.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) * z)
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * z);
}
def code(x, y, z): return x + (((y - x) * 6.0) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z)) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * 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 = x + (((y - x) * (6)) * z) END code
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 :pre TRUE (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
return x + (((y - x) * 6.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) * z)
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * z);
}
def code(x, y, z): return x + (((y - x) * 6.0) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z)) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * 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 = x + (((y - x) * (6)) * z) END code
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
(FPCore (x y z) :precision binary64 :pre TRUE (fma -6.0 (* (- x y) z) x))
double code(double x, double y, double z) {
return fma(-6.0, ((x - y) * z), x);
}
function code(x, y, z) return fma(-6.0, Float64(Float64(x - y) * z), x) end
code[x_, y_, z_] := N[(-6.0 * N[(N[(x - y), $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 = ((-6) * ((x - y) * z)) + x END code
\mathsf{fma}\left(-6, \left(x - y\right) \cdot z, x\right)
Initial program 99.6%
Applied rewrites99.8%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* z (* 6.0 (- y x)))))
(if (<= z -28165673201.033638)
t_0
(if (<= z 7.845250112058621e-9) (fma z (* y 6.0) x) t_0))))double code(double x, double y, double z) {
double t_0 = z * (6.0 * (y - x));
double tmp;
if (z <= -28165673201.033638) {
tmp = t_0;
} else if (z <= 7.845250112058621e-9) {
tmp = fma(z, (y * 6.0), x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(z * Float64(6.0 * Float64(y - x))) tmp = 0.0 if (z <= -28165673201.033638) tmp = t_0; elseif (z <= 7.845250112058621e-9) tmp = fma(z, Float64(y * 6.0), x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(6.0 * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -28165673201.033638], t$95$0, If[LessEqual[z, 7.845250112058621e-9], N[(z * N[(y * 6.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 = (z * ((6) * (y - x))) IN LET tmp_1 = IF (z <= (78452501120586211901078397558915999976392185999429784715175628662109375e-79)) THEN ((z * (y * (6))) + x) ELSE t_0 ENDIF IN LET tmp = IF (z <= (-2816567320103363800048828125e-17)) THEN t_0 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := z \cdot \left(6 \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -28165673201.033638:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 7.845250112058621 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(z, y \cdot 6, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if z < -28165673201.033638 or 7.8452501120586212e-9 < z Initial program 99.6%
Taylor expanded in z around inf
Applied rewrites87.9%
Taylor expanded in z around inf
Applied rewrites64.9%
if -28165673201.033638 < z < 7.8452501120586212e-9Initial program 99.6%
Taylor expanded in x around 0
Applied rewrites75.5%
Applied rewrites75.5%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x -1.9574573609995736e+91)
(fma z (* -6.0 x) x)
(if (<= x 0.0005660629841236394)
(fma z (* y 6.0) x)
(* (fma -6.0 z 1.0) x))))double code(double x, double y, double z) {
double tmp;
if (x <= -1.9574573609995736e+91) {
tmp = fma(z, (-6.0 * x), x);
} else if (x <= 0.0005660629841236394) {
tmp = fma(z, (y * 6.0), x);
} else {
tmp = fma(-6.0, z, 1.0) * x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -1.9574573609995736e+91) tmp = fma(z, Float64(-6.0 * x), x); elseif (x <= 0.0005660629841236394) tmp = fma(z, Float64(y * 6.0), x); else tmp = Float64(fma(-6.0, z, 1.0) * x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -1.9574573609995736e+91], N[(z * N[(-6.0 * x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[x, 0.0005660629841236394], N[(z * N[(y * 6.0), $MachinePrecision] + x), $MachinePrecision], N[(N[(-6.0 * z + 1.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 = LET tmp_1 = IF (x <= (566062984123639448448550570702764161978848278522491455078125e-63)) THEN ((z * (y * (6))) + x) ELSE ((((-6) * z) + (1)) * x) ENDIF IN LET tmp = IF (x <= (-19574573609995735600635967846953792076791839711159263895675501474379448978998529820238807040)) THEN ((z * ((-6) * x)) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq -1.9574573609995736 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(z, -6 \cdot x, x\right)\\
\mathbf{elif}\;x \leq 0.0005660629841236394:\\
\;\;\;\;\mathsf{fma}\left(z, y \cdot 6, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-6, z, 1\right) \cdot x\\
\end{array}
if x < -1.9574573609995736e91Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.2%
Applied rewrites62.2%
if -1.9574573609995736e91 < x < 5.6606298412363945e-4Initial program 99.6%
Taylor expanded in x around 0
Applied rewrites75.5%
Applied rewrites75.5%
if 5.6606298412363945e-4 < x Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x -1.9574573609995736e+91)
(fma z (* -6.0 x) x)
(if (<= x 0.0005660629841236394)
(fma 6.0 (* y z) x)
(* (fma -6.0 z 1.0) x))))double code(double x, double y, double z) {
double tmp;
if (x <= -1.9574573609995736e+91) {
tmp = fma(z, (-6.0 * x), x);
} else if (x <= 0.0005660629841236394) {
tmp = fma(6.0, (y * z), x);
} else {
tmp = fma(-6.0, z, 1.0) * x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -1.9574573609995736e+91) tmp = fma(z, Float64(-6.0 * x), x); elseif (x <= 0.0005660629841236394) tmp = fma(6.0, Float64(y * z), x); else tmp = Float64(fma(-6.0, z, 1.0) * x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -1.9574573609995736e+91], N[(z * N[(-6.0 * x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[x, 0.0005660629841236394], N[(6.0 * N[(y * z), $MachinePrecision] + x), $MachinePrecision], N[(N[(-6.0 * z + 1.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 = LET tmp_1 = IF (x <= (566062984123639448448550570702764161978848278522491455078125e-63)) THEN (((6) * (y * z)) + x) ELSE ((((-6) * z) + (1)) * x) ENDIF IN LET tmp = IF (x <= (-19574573609995735600635967846953792076791839711159263895675501474379448978998529820238807040)) THEN ((z * ((-6) * x)) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq -1.9574573609995736 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(z, -6 \cdot x, x\right)\\
\mathbf{elif}\;x \leq 0.0005660629841236394:\\
\;\;\;\;\mathsf{fma}\left(6, y \cdot z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-6, z, 1\right) \cdot x\\
\end{array}
if x < -1.9574573609995736e91Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.2%
Applied rewrites62.2%
if -1.9574573609995736e91 < x < 5.6606298412363945e-4Initial program 99.6%
Taylor expanded in x around 0
Applied rewrites75.5%
Applied rewrites75.6%
if 5.6606298412363945e-4 < x Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= x -1.9574573609995736e+91)
(fma -6.0 (* z x) x)
(if (<= x 0.0005660629841236394)
(fma 6.0 (* y z) x)
(* (fma -6.0 z 1.0) x))))double code(double x, double y, double z) {
double tmp;
if (x <= -1.9574573609995736e+91) {
tmp = fma(-6.0, (z * x), x);
} else if (x <= 0.0005660629841236394) {
tmp = fma(6.0, (y * z), x);
} else {
tmp = fma(-6.0, z, 1.0) * x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -1.9574573609995736e+91) tmp = fma(-6.0, Float64(z * x), x); elseif (x <= 0.0005660629841236394) tmp = fma(6.0, Float64(y * z), x); else tmp = Float64(fma(-6.0, z, 1.0) * x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -1.9574573609995736e+91], N[(-6.0 * N[(z * x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[x, 0.0005660629841236394], N[(6.0 * N[(y * z), $MachinePrecision] + x), $MachinePrecision], N[(N[(-6.0 * z + 1.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 = LET tmp_1 = IF (x <= (566062984123639448448550570702764161978848278522491455078125e-63)) THEN (((6) * (y * z)) + x) ELSE ((((-6) * z) + (1)) * x) ENDIF IN LET tmp = IF (x <= (-19574573609995735600635967846953792076791839711159263895675501474379448978998529820238807040)) THEN (((-6) * (z * x)) + x) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;x \leq -1.9574573609995736 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(-6, z \cdot x, x\right)\\
\mathbf{elif}\;x \leq 0.0005660629841236394:\\
\;\;\;\;\mathsf{fma}\left(6, y \cdot z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-6, z, 1\right) \cdot x\\
\end{array}
if x < -1.9574573609995736e91Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
if -1.9574573609995736e91 < x < 5.6606298412363945e-4Initial program 99.6%
Taylor expanded in x around 0
Applied rewrites75.5%
Applied rewrites75.6%
if 5.6606298412363945e-4 < x Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* z (* 6.0 y))))
(if (<= y -2.034826382675621e+177)
t_0
(if (<= y 2.727325893764305e+120) (* (fma -6.0 z 1.0) x) t_0))))double code(double x, double y, double z) {
double t_0 = z * (6.0 * y);
double tmp;
if (y <= -2.034826382675621e+177) {
tmp = t_0;
} else if (y <= 2.727325893764305e+120) {
tmp = fma(-6.0, z, 1.0) * x;
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(z * Float64(6.0 * y)) tmp = 0.0 if (y <= -2.034826382675621e+177) tmp = t_0; elseif (y <= 2.727325893764305e+120) tmp = Float64(fma(-6.0, z, 1.0) * x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(6.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.034826382675621e+177], t$95$0, If[LessEqual[y, 2.727325893764305e+120], N[(N[(-6.0 * z + 1.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 = (z * ((6) * y)) IN LET tmp_1 = IF (y <= (2727325893764304952337864284099369734672726102996935792482044238117505441831551720658621706644790338763370656773728894976)) THEN ((((-6) * z) + (1)) * x) ELSE t_0 ENDIF IN LET tmp = IF (y <= (-2034826382675620969538188077698691635021966652104782161099435007919111885452274644684976849485284282903270108001271516845889509387433253108116847946518093992975655544772733435904)) THEN t_0 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := z \cdot \left(6 \cdot y\right)\\
\mathbf{if}\;y \leq -2.034826382675621 \cdot 10^{+177}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.727325893764305 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(-6, z, 1\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if y < -2.034826382675621e177 or 2.727325893764305e120 < y Initial program 99.6%
Taylor expanded in z around inf
Applied rewrites87.9%
Taylor expanded in z around inf
Applied rewrites64.9%
Taylor expanded in x around 0
Applied rewrites41.3%
if -2.034826382675621e177 < y < 2.727325893764305e120Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* z (* 6.0 y))))
(if (<= y -2.034826382675621e+177)
t_0
(if (<= y 2.727325893764305e+120) (fma -6.0 (* z x) x) t_0))))double code(double x, double y, double z) {
double t_0 = z * (6.0 * y);
double tmp;
if (y <= -2.034826382675621e+177) {
tmp = t_0;
} else if (y <= 2.727325893764305e+120) {
tmp = fma(-6.0, (z * x), x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(z * Float64(6.0 * y)) tmp = 0.0 if (y <= -2.034826382675621e+177) tmp = t_0; elseif (y <= 2.727325893764305e+120) tmp = fma(-6.0, Float64(z * x), x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(6.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.034826382675621e+177], t$95$0, If[LessEqual[y, 2.727325893764305e+120], N[(-6.0 * N[(z * x), $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 = (z * ((6) * y)) IN LET tmp_1 = IF (y <= (2727325893764304952337864284099369734672726102996935792482044238117505441831551720658621706644790338763370656773728894976)) THEN (((-6) * (z * x)) + x) ELSE t_0 ENDIF IN LET tmp = IF (y <= (-2034826382675620969538188077698691635021966652104782161099435007919111885452274644684976849485284282903270108001271516845889509387433253108116847946518093992975655544772733435904)) THEN t_0 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := z \cdot \left(6 \cdot y\right)\\
\mathbf{if}\;y \leq -2.034826382675621 \cdot 10^{+177}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.727325893764305 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(-6, z \cdot x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if y < -2.034826382675621e177 or 2.727325893764305e120 < y Initial program 99.6%
Taylor expanded in z around inf
Applied rewrites87.9%
Taylor expanded in z around inf
Applied rewrites64.9%
Taylor expanded in x around 0
Applied rewrites41.3%
if -2.034826382675621e177 < y < 2.727325893764305e120Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
(FPCore (x y z)
:precision binary64
:pre TRUE
(if (<= z -8.278241671405412e+113)
(* -6.0 (* x z))
(if (<= z -1.5998878487717716e-87)
(* z (* 6.0 y))
(if (<= z 1.4132947115915006e-40) (* x 1.0) (* 6.0 (* y z))))))double code(double x, double y, double z) {
double tmp;
if (z <= -8.278241671405412e+113) {
tmp = -6.0 * (x * z);
} else if (z <= -1.5998878487717716e-87) {
tmp = z * (6.0 * y);
} else if (z <= 1.4132947115915006e-40) {
tmp = x * 1.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 <= (-8.278241671405412d+113)) then
tmp = (-6.0d0) * (x * z)
else if (z <= (-1.5998878487717716d-87)) then
tmp = z * (6.0d0 * y)
else if (z <= 1.4132947115915006d-40) then
tmp = x * 1.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 <= -8.278241671405412e+113) {
tmp = -6.0 * (x * z);
} else if (z <= -1.5998878487717716e-87) {
tmp = z * (6.0 * y);
} else if (z <= 1.4132947115915006e-40) {
tmp = x * 1.0;
} else {
tmp = 6.0 * (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -8.278241671405412e+113: tmp = -6.0 * (x * z) elif z <= -1.5998878487717716e-87: tmp = z * (6.0 * y) elif z <= 1.4132947115915006e-40: tmp = x * 1.0 else: tmp = 6.0 * (y * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -8.278241671405412e+113) tmp = Float64(-6.0 * Float64(x * z)); elseif (z <= -1.5998878487717716e-87) tmp = Float64(z * Float64(6.0 * y)); elseif (z <= 1.4132947115915006e-40) tmp = Float64(x * 1.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 <= -8.278241671405412e+113) tmp = -6.0 * (x * z); elseif (z <= -1.5998878487717716e-87) tmp = z * (6.0 * y); elseif (z <= 1.4132947115915006e-40) tmp = x * 1.0; else tmp = 6.0 * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -8.278241671405412e+113], N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5998878487717716e-87], N[(z * N[(6.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4132947115915006e-40], N[(x * 1.0), $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 <= (14132947115915006468182910235642061199906833362565967651395812855413318177857125598375794078304482317867511731446228395725484006106853485107421875e-185)) THEN (x * (1)) ELSE ((6) * (y * z)) ENDIF IN LET tmp_1 = IF (z <= (-159988784877177164685523371169830722870522374072384409119026858684832480050318864005140114871679013601761552483193181404403016128515199488354968070059220853336754264519220820635743157089849151568897638446024723319315030689580225953250192105770111083984375e-341)) THEN (z * ((6) * y)) ELSE tmp_2 ENDIF IN LET tmp = IF (z <= (-827824167140541243899520753986607661237673954454153700601859801186490414593025111553349927768106486631838959796224)) THEN ((-6) * (x * z)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;z \leq -8.278241671405412 \cdot 10^{+113}:\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -1.5998878487717716 \cdot 10^{-87}:\\
\;\;\;\;z \cdot \left(6 \cdot y\right)\\
\mathbf{elif}\;z \leq 1.4132947115915006 \cdot 10^{-40}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(y \cdot z\right)\\
\end{array}
if z < -8.2782416714054124e113Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
Taylor expanded in z around inf
Applied rewrites28.2%
if -8.2782416714054124e113 < z < -1.5998878487717716e-87Initial program 99.6%
Taylor expanded in z around inf
Applied rewrites87.9%
Taylor expanded in z around inf
Applied rewrites64.9%
Taylor expanded in x around 0
Applied rewrites41.3%
if -1.5998878487717716e-87 < z < 1.4132947115915006e-40Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Taylor expanded in z around 0
Applied rewrites36.5%
if 1.4132947115915006e-40 < z Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
Taylor expanded in x around 0
Applied rewrites41.3%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* z (* 6.0 y))))
(if (<= z -8.278241671405412e+113)
(* -6.0 (* x z))
(if (<= z -1.5998878487717716e-87)
t_0
(if (<= z 1.4132947115915006e-40) (* x 1.0) t_0)))))double code(double x, double y, double z) {
double t_0 = z * (6.0 * y);
double tmp;
if (z <= -8.278241671405412e+113) {
tmp = -6.0 * (x * z);
} else if (z <= -1.5998878487717716e-87) {
tmp = t_0;
} else if (z <= 1.4132947115915006e-40) {
tmp = x * 1.0;
} else {
tmp = t_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 * (6.0d0 * y)
if (z <= (-8.278241671405412d+113)) then
tmp = (-6.0d0) * (x * z)
else if (z <= (-1.5998878487717716d-87)) then
tmp = t_0
else if (z <= 1.4132947115915006d-40) then
tmp = x * 1.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (6.0 * y);
double tmp;
if (z <= -8.278241671405412e+113) {
tmp = -6.0 * (x * z);
} else if (z <= -1.5998878487717716e-87) {
tmp = t_0;
} else if (z <= 1.4132947115915006e-40) {
tmp = x * 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (6.0 * y) tmp = 0 if z <= -8.278241671405412e+113: tmp = -6.0 * (x * z) elif z <= -1.5998878487717716e-87: tmp = t_0 elif z <= 1.4132947115915006e-40: tmp = x * 1.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(6.0 * y)) tmp = 0.0 if (z <= -8.278241671405412e+113) tmp = Float64(-6.0 * Float64(x * z)); elseif (z <= -1.5998878487717716e-87) tmp = t_0; elseif (z <= 1.4132947115915006e-40) tmp = Float64(x * 1.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (6.0 * y); tmp = 0.0; if (z <= -8.278241671405412e+113) tmp = -6.0 * (x * z); elseif (z <= -1.5998878487717716e-87) tmp = t_0; elseif (z <= 1.4132947115915006e-40) tmp = x * 1.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(6.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.278241671405412e+113], N[(-6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5998878487717716e-87], t$95$0, If[LessEqual[z, 1.4132947115915006e-40], N[(x * 1.0), $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 = (z * ((6) * y)) IN LET tmp_2 = IF (z <= (14132947115915006468182910235642061199906833362565967651395812855413318177857125598375794078304482317867511731446228395725484006106853485107421875e-185)) THEN (x * (1)) ELSE t_0 ENDIF IN LET tmp_1 = IF (z <= (-159988784877177164685523371169830722870522374072384409119026858684832480050318864005140114871679013601761552483193181404403016128515199488354968070059220853336754264519220820635743157089849151568897638446024723319315030689580225953250192105770111083984375e-341)) THEN t_0 ELSE tmp_2 ENDIF IN LET tmp = IF (z <= (-827824167140541243899520753986607661237673954454153700601859801186490414593025111553349927768106486631838959796224)) THEN ((-6) * (x * z)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := z \cdot \left(6 \cdot y\right)\\
\mathbf{if}\;z \leq -8.278241671405412 \cdot 10^{+113}:\\
\;\;\;\;-6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -1.5998878487717716 \cdot 10^{-87}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.4132947115915006 \cdot 10^{-40}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if z < -8.2782416714054124e113Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Applied rewrites62.4%
Taylor expanded in z around inf
Applied rewrites28.2%
if -8.2782416714054124e113 < z < -1.5998878487717716e-87 or 1.4132947115915006e-40 < z Initial program 99.6%
Taylor expanded in z around inf
Applied rewrites87.9%
Taylor expanded in z around inf
Applied rewrites64.9%
Taylor expanded in x around 0
Applied rewrites41.3%
if -1.5998878487717716e-87 < z < 1.4132947115915006e-40Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Taylor expanded in z around 0
Applied rewrites36.5%
(FPCore (x y z)
:precision binary64
:pre TRUE
(let* ((t_0 (* z (* 6.0 y))))
(if (<= z -1.5998878487717716e-87)
t_0
(if (<= z 1.4132947115915006e-40) (* x 1.0) t_0))))double code(double x, double y, double z) {
double t_0 = z * (6.0 * y);
double tmp;
if (z <= -1.5998878487717716e-87) {
tmp = t_0;
} else if (z <= 1.4132947115915006e-40) {
tmp = x * 1.0;
} else {
tmp = t_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 * (6.0d0 * y)
if (z <= (-1.5998878487717716d-87)) then
tmp = t_0
else if (z <= 1.4132947115915006d-40) then
tmp = x * 1.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (6.0 * y);
double tmp;
if (z <= -1.5998878487717716e-87) {
tmp = t_0;
} else if (z <= 1.4132947115915006e-40) {
tmp = x * 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (6.0 * y) tmp = 0 if z <= -1.5998878487717716e-87: tmp = t_0 elif z <= 1.4132947115915006e-40: tmp = x * 1.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(6.0 * y)) tmp = 0.0 if (z <= -1.5998878487717716e-87) tmp = t_0; elseif (z <= 1.4132947115915006e-40) tmp = Float64(x * 1.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (6.0 * y); tmp = 0.0; if (z <= -1.5998878487717716e-87) tmp = t_0; elseif (z <= 1.4132947115915006e-40) tmp = x * 1.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(6.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5998878487717716e-87], t$95$0, If[LessEqual[z, 1.4132947115915006e-40], N[(x * 1.0), $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 = (z * ((6) * y)) IN LET tmp_1 = IF (z <= (14132947115915006468182910235642061199906833362565967651395812855413318177857125598375794078304482317867511731446228395725484006106853485107421875e-185)) THEN (x * (1)) ELSE t_0 ENDIF IN LET tmp = IF (z <= (-159988784877177164685523371169830722870522374072384409119026858684832480050318864005140114871679013601761552483193181404403016128515199488354968070059220853336754264519220820635743157089849151568897638446024723319315030689580225953250192105770111083984375e-341)) THEN t_0 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := z \cdot \left(6 \cdot y\right)\\
\mathbf{if}\;z \leq -1.5998878487717716 \cdot 10^{-87}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.4132947115915006 \cdot 10^{-40}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if z < -1.5998878487717716e-87 or 1.4132947115915006e-40 < z Initial program 99.6%
Taylor expanded in z around inf
Applied rewrites87.9%
Taylor expanded in z around inf
Applied rewrites64.9%
Taylor expanded in x around 0
Applied rewrites41.3%
if -1.5998878487717716e-87 < z < 1.4132947115915006e-40Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Taylor expanded in z around 0
Applied rewrites36.5%
(FPCore (x y z) :precision binary64 :pre TRUE (* x 1.0))
double code(double x, double y, double z) {
return x * 1.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 * 1.0d0
end function
public static double code(double x, double y, double z) {
return x * 1.0;
}
def code(x, y, z): return x * 1.0
function code(x, y, z) return Float64(x * 1.0) end
function tmp = code(x, y, z) tmp = x * 1.0; end
code[x_, y_, z_] := N[(x * 1.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 * (1) END code
x \cdot 1
Initial program 99.6%
Taylor expanded in x around inf
Applied rewrites62.4%
Taylor expanded in z around 0
Applied rewrites36.5%
herbie shell --seed 2026092
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"
:precision binary64
(+ x (* (* (- y x) 6.0) z)))