
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
(FPCore (x y z t) :precision binary64 (fma (- y z) (- t x) x))
double code(double x, double y, double z, double t) {
return fma((y - z), (t - x), x);
}
function code(x, y, z, t) return fma(Float64(y - z), Float64(t - x), x) end
code[x_, y_, z_, t_] := N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - z, t - x, x\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -1.5e+126)
t_1
(if (<= z -9.5e+17)
(* z x)
(if (<= z -2.1e-33)
t_1
(if (<= z -3.9e-161)
(* y (- x))
(if (<= z -1.36e-299)
(* y t)
(if (<= z 3e-170)
x
(if (<= z 5.2e+23)
(* y t)
(if (or (<= z 5.7e+195) (not (<= z 1.25e+245)))
t_1
(* z x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -1.5e+126) {
tmp = t_1;
} else if (z <= -9.5e+17) {
tmp = z * x;
} else if (z <= -2.1e-33) {
tmp = t_1;
} else if (z <= -3.9e-161) {
tmp = y * -x;
} else if (z <= -1.36e-299) {
tmp = y * t;
} else if (z <= 3e-170) {
tmp = x;
} else if (z <= 5.2e+23) {
tmp = y * t;
} else if ((z <= 5.7e+195) || !(z <= 1.25e+245)) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * -t
if (z <= (-1.5d+126)) then
tmp = t_1
else if (z <= (-9.5d+17)) then
tmp = z * x
else if (z <= (-2.1d-33)) then
tmp = t_1
else if (z <= (-3.9d-161)) then
tmp = y * -x
else if (z <= (-1.36d-299)) then
tmp = y * t
else if (z <= 3d-170) then
tmp = x
else if (z <= 5.2d+23) then
tmp = y * t
else if ((z <= 5.7d+195) .or. (.not. (z <= 1.25d+245))) then
tmp = t_1
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -1.5e+126) {
tmp = t_1;
} else if (z <= -9.5e+17) {
tmp = z * x;
} else if (z <= -2.1e-33) {
tmp = t_1;
} else if (z <= -3.9e-161) {
tmp = y * -x;
} else if (z <= -1.36e-299) {
tmp = y * t;
} else if (z <= 3e-170) {
tmp = x;
} else if (z <= 5.2e+23) {
tmp = y * t;
} else if ((z <= 5.7e+195) || !(z <= 1.25e+245)) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -1.5e+126: tmp = t_1 elif z <= -9.5e+17: tmp = z * x elif z <= -2.1e-33: tmp = t_1 elif z <= -3.9e-161: tmp = y * -x elif z <= -1.36e-299: tmp = y * t elif z <= 3e-170: tmp = x elif z <= 5.2e+23: tmp = y * t elif (z <= 5.7e+195) or not (z <= 1.25e+245): tmp = t_1 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -1.5e+126) tmp = t_1; elseif (z <= -9.5e+17) tmp = Float64(z * x); elseif (z <= -2.1e-33) tmp = t_1; elseif (z <= -3.9e-161) tmp = Float64(y * Float64(-x)); elseif (z <= -1.36e-299) tmp = Float64(y * t); elseif (z <= 3e-170) tmp = x; elseif (z <= 5.2e+23) tmp = Float64(y * t); elseif ((z <= 5.7e+195) || !(z <= 1.25e+245)) tmp = t_1; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -1.5e+126) tmp = t_1; elseif (z <= -9.5e+17) tmp = z * x; elseif (z <= -2.1e-33) tmp = t_1; elseif (z <= -3.9e-161) tmp = y * -x; elseif (z <= -1.36e-299) tmp = y * t; elseif (z <= 3e-170) tmp = x; elseif (z <= 5.2e+23) tmp = y * t; elseif ((z <= 5.7e+195) || ~((z <= 1.25e+245))) tmp = t_1; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -1.5e+126], t$95$1, If[LessEqual[z, -9.5e+17], N[(z * x), $MachinePrecision], If[LessEqual[z, -2.1e-33], t$95$1, If[LessEqual[z, -3.9e-161], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -1.36e-299], N[(y * t), $MachinePrecision], If[LessEqual[z, 3e-170], x, If[LessEqual[z, 5.2e+23], N[(y * t), $MachinePrecision], If[Or[LessEqual[z, 5.7e+195], N[Not[LessEqual[z, 1.25e+245]], $MachinePrecision]], t$95$1, N[(z * x), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-161}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq -1.36 \cdot 10^{-299}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-170}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+23}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{+195} \lor \neg \left(z \leq 1.25 \cdot 10^{+245}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -1.5000000000000001e126 or -9.5e17 < z < -2.1e-33 or 5.19999999999999983e23 < z < 5.7000000000000002e195 or 1.25000000000000009e245 < z Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in90.1%
Applied egg-rr90.1%
Taylor expanded in x around 0 58.9%
associate-+r+58.9%
mul-1-neg58.9%
*-commutative58.9%
sub-neg58.9%
associate-+l-58.9%
*-commutative58.9%
Applied egg-rr58.9%
Taylor expanded in z around inf 55.7%
associate-*r*55.7%
neg-mul-155.7%
Simplified55.7%
if -1.5000000000000001e126 < z < -9.5e17 or 5.7000000000000002e195 < z < 1.25000000000000009e245Initial program 100.0%
Taylor expanded in y around 0 89.0%
mul-1-neg89.0%
distribute-lft-neg-out89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in t around 0 66.6%
Taylor expanded in z around inf 66.6%
*-commutative66.6%
Simplified66.6%
if -2.1e-33 < z < -3.89999999999999973e-161Initial program 99.9%
Taylor expanded in t around 0 76.9%
mul-1-neg76.9%
distribute-rgt-neg-in76.9%
neg-sub076.9%
sub-neg76.9%
+-commutative76.9%
associate--r+76.9%
neg-sub076.9%
remove-double-neg76.9%
Simplified76.9%
Taylor expanded in y around inf 47.3%
associate-*r*47.3%
neg-mul-147.3%
*-commutative47.3%
Simplified47.3%
if -3.89999999999999973e-161 < z < -1.36000000000000007e-299 or 3.00000000000000013e-170 < z < 5.19999999999999983e23Initial program 100.0%
Taylor expanded in t around inf 80.4%
Taylor expanded in y around inf 46.1%
*-commutative46.1%
Simplified46.1%
if -1.36000000000000007e-299 < z < 3.00000000000000013e-170Initial program 100.0%
Taylor expanded in t around inf 93.4%
Taylor expanded in x around inf 64.1%
Final simplification54.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -21000.0)
(* z x)
(if (<= z -4.9e-161)
(* y (- x))
(if (<= z -9.5e-301)
(* y t)
(if (<= z 5.2e-170) x (if (<= z 2.5e+20) (* y t) (* z x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -21000.0) {
tmp = z * x;
} else if (z <= -4.9e-161) {
tmp = y * -x;
} else if (z <= -9.5e-301) {
tmp = y * t;
} else if (z <= 5.2e-170) {
tmp = x;
} else if (z <= 2.5e+20) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-21000.0d0)) then
tmp = z * x
else if (z <= (-4.9d-161)) then
tmp = y * -x
else if (z <= (-9.5d-301)) then
tmp = y * t
else if (z <= 5.2d-170) then
tmp = x
else if (z <= 2.5d+20) then
tmp = y * t
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -21000.0) {
tmp = z * x;
} else if (z <= -4.9e-161) {
tmp = y * -x;
} else if (z <= -9.5e-301) {
tmp = y * t;
} else if (z <= 5.2e-170) {
tmp = x;
} else if (z <= 2.5e+20) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -21000.0: tmp = z * x elif z <= -4.9e-161: tmp = y * -x elif z <= -9.5e-301: tmp = y * t elif z <= 5.2e-170: tmp = x elif z <= 2.5e+20: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -21000.0) tmp = Float64(z * x); elseif (z <= -4.9e-161) tmp = Float64(y * Float64(-x)); elseif (z <= -9.5e-301) tmp = Float64(y * t); elseif (z <= 5.2e-170) tmp = x; elseif (z <= 2.5e+20) tmp = Float64(y * t); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -21000.0) tmp = z * x; elseif (z <= -4.9e-161) tmp = y * -x; elseif (z <= -9.5e-301) tmp = y * t; elseif (z <= 5.2e-170) tmp = x; elseif (z <= 2.5e+20) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -21000.0], N[(z * x), $MachinePrecision], If[LessEqual[z, -4.9e-161], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -9.5e-301], N[(y * t), $MachinePrecision], If[LessEqual[z, 5.2e-170], x, If[LessEqual[z, 2.5e+20], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -21000:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-161}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-301}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-170}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+20}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -21000 or 2.5e20 < z Initial program 100.0%
Taylor expanded in y around 0 83.0%
mul-1-neg83.0%
distribute-lft-neg-out83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in t around 0 42.5%
Taylor expanded in z around inf 42.5%
*-commutative42.5%
Simplified42.5%
if -21000 < z < -4.90000000000000035e-161Initial program 100.0%
Taylor expanded in t around 0 73.2%
mul-1-neg73.2%
distribute-rgt-neg-in73.2%
neg-sub073.2%
sub-neg73.2%
+-commutative73.2%
associate--r+73.2%
neg-sub073.2%
remove-double-neg73.2%
Simplified73.2%
Taylor expanded in y around inf 42.2%
associate-*r*42.2%
neg-mul-142.2%
*-commutative42.2%
Simplified42.2%
if -4.90000000000000035e-161 < z < -9.50000000000000032e-301 or 5.2000000000000003e-170 < z < 2.5e20Initial program 100.0%
Taylor expanded in t around inf 81.4%
Taylor expanded in y around inf 46.6%
*-commutative46.6%
Simplified46.6%
if -9.50000000000000032e-301 < z < 5.2000000000000003e-170Initial program 100.0%
Taylor expanded in t around inf 93.4%
Taylor expanded in x around inf 64.1%
Final simplification45.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -6.6e-34)
t_1
(if (<= z -5.9e-161)
(- x (* y x))
(if (<= z 3.2e+19) (+ x (* (- y z) t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -6.6e-34) {
tmp = t_1;
} else if (z <= -5.9e-161) {
tmp = x - (y * x);
} else if (z <= 3.2e+19) {
tmp = x + ((y - z) * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * (x - t)
if (z <= (-6.6d-34)) then
tmp = t_1
else if (z <= (-5.9d-161)) then
tmp = x - (y * x)
else if (z <= 3.2d+19) then
tmp = x + ((y - z) * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -6.6e-34) {
tmp = t_1;
} else if (z <= -5.9e-161) {
tmp = x - (y * x);
} else if (z <= 3.2e+19) {
tmp = x + ((y - z) * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -6.6e-34: tmp = t_1 elif z <= -5.9e-161: tmp = x - (y * x) elif z <= 3.2e+19: tmp = x + ((y - z) * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -6.6e-34) tmp = t_1; elseif (z <= -5.9e-161) tmp = Float64(x - Float64(y * x)); elseif (z <= 3.2e+19) tmp = Float64(x + Float64(Float64(y - z) * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); tmp = 0.0; if (z <= -6.6e-34) tmp = t_1; elseif (z <= -5.9e-161) tmp = x - (y * x); elseif (z <= 3.2e+19) tmp = x + ((y - z) * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e-34], t$95$1, If[LessEqual[z, -5.9e-161], N[(x - N[(y * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+19], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.9 \cdot 10^{-161}:\\
\;\;\;\;x - y \cdot x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+19}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.59999999999999965e-34 or 3.2e19 < z Initial program 100.0%
Taylor expanded in y around 0 82.5%
mul-1-neg82.5%
distribute-lft-neg-out82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in x around 0 80.2%
Taylor expanded in z around inf 80.8%
neg-mul-180.8%
unsub-neg80.8%
Simplified80.8%
if -6.59999999999999965e-34 < z < -5.9000000000000002e-161Initial program 99.9%
Taylor expanded in t around 0 76.9%
mul-1-neg76.9%
distribute-rgt-neg-in76.9%
neg-sub076.9%
sub-neg76.9%
+-commutative76.9%
associate--r+76.9%
neg-sub076.9%
remove-double-neg76.9%
Simplified76.9%
Taylor expanded in z around 0 76.9%
*-rgt-identity76.9%
mul-1-neg76.9%
distribute-rgt-neg-out76.9%
distribute-lft-in76.8%
unsub-neg76.8%
Simplified76.8%
Taylor expanded in y around 0 76.9%
mul-1-neg76.9%
*-commutative76.9%
sub-neg76.9%
Simplified76.9%
if -5.9000000000000002e-161 < z < 3.2e19Initial program 100.0%
Taylor expanded in t around inf 84.3%
Final simplification81.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) t)))
(if (<= t -1.36e-33)
t_1
(if (<= t 1.6e-210) (* z x) (if (<= t 1.5e-10) x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if (t <= -1.36e-33) {
tmp = t_1;
} else if (t <= 1.6e-210) {
tmp = z * x;
} else if (t <= 1.5e-10) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * t
if (t <= (-1.36d-33)) then
tmp = t_1
else if (t <= 1.6d-210) then
tmp = z * x
else if (t <= 1.5d-10) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if (t <= -1.36e-33) {
tmp = t_1;
} else if (t <= 1.6e-210) {
tmp = z * x;
} else if (t <= 1.5e-10) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t tmp = 0 if t <= -1.36e-33: tmp = t_1 elif t <= 1.6e-210: tmp = z * x elif t <= 1.5e-10: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) tmp = 0.0 if (t <= -1.36e-33) tmp = t_1; elseif (t <= 1.6e-210) tmp = Float64(z * x); elseif (t <= 1.5e-10) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; tmp = 0.0; if (t <= -1.36e-33) tmp = t_1; elseif (t <= 1.6e-210) tmp = z * x; elseif (t <= 1.5e-10) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.36e-33], t$95$1, If[LessEqual[t, 1.6e-210], N[(z * x), $MachinePrecision], If[LessEqual[t, 1.5e-10], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
\mathbf{if}\;t \leq -1.36 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-210}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-10}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.36e-33 or 1.5e-10 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in93.5%
Applied egg-rr93.5%
Taylor expanded in x around 0 79.4%
associate-+r+79.4%
mul-1-neg79.4%
*-commutative79.4%
sub-neg79.4%
associate-+l-79.4%
*-commutative79.4%
Applied egg-rr79.4%
Taylor expanded in x around 0 71.3%
distribute-lft-out--76.5%
Simplified76.5%
if -1.36e-33 < t < 1.60000000000000014e-210Initial program 100.0%
Taylor expanded in y around 0 76.6%
mul-1-neg76.6%
distribute-lft-neg-out76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in t around 0 71.4%
Taylor expanded in z around inf 41.8%
*-commutative41.8%
Simplified41.8%
if 1.60000000000000014e-210 < t < 1.5e-10Initial program 99.9%
Taylor expanded in t around inf 63.1%
Taylor expanded in x around inf 44.6%
Final simplification63.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) t)))
(if (<= t -1.25e-19)
t_1
(if (<= t -7.2e-119)
(* z (- x t))
(if (<= t 3.6e+24) (* x (- 1.0 y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if (t <= -1.25e-19) {
tmp = t_1;
} else if (t <= -7.2e-119) {
tmp = z * (x - t);
} else if (t <= 3.6e+24) {
tmp = x * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * t
if (t <= (-1.25d-19)) then
tmp = t_1
else if (t <= (-7.2d-119)) then
tmp = z * (x - t)
else if (t <= 3.6d+24) then
tmp = x * (1.0d0 - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if (t <= -1.25e-19) {
tmp = t_1;
} else if (t <= -7.2e-119) {
tmp = z * (x - t);
} else if (t <= 3.6e+24) {
tmp = x * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t tmp = 0 if t <= -1.25e-19: tmp = t_1 elif t <= -7.2e-119: tmp = z * (x - t) elif t <= 3.6e+24: tmp = x * (1.0 - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) tmp = 0.0 if (t <= -1.25e-19) tmp = t_1; elseif (t <= -7.2e-119) tmp = Float64(z * Float64(x - t)); elseif (t <= 3.6e+24) tmp = Float64(x * Float64(1.0 - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; tmp = 0.0; if (t <= -1.25e-19) tmp = t_1; elseif (t <= -7.2e-119) tmp = z * (x - t); elseif (t <= 3.6e+24) tmp = x * (1.0 - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.25e-19], t$95$1, If[LessEqual[t, -7.2e-119], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+24], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-119}:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.2500000000000001e-19 or 3.59999999999999983e24 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in92.9%
Applied egg-rr92.9%
Taylor expanded in x around 0 80.2%
associate-+r+80.2%
mul-1-neg80.2%
*-commutative80.2%
sub-neg80.2%
associate-+l-80.2%
*-commutative80.2%
Applied egg-rr80.2%
Taylor expanded in x around 0 73.5%
distribute-lft-out--79.1%
Simplified79.1%
if -1.2500000000000001e-19 < t < -7.2e-119Initial program 99.9%
Taylor expanded in y around 0 84.5%
mul-1-neg84.5%
distribute-lft-neg-out84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in x around 0 84.5%
Taylor expanded in z around inf 64.0%
neg-mul-164.0%
unsub-neg64.0%
Simplified64.0%
if -7.2e-119 < t < 3.59999999999999983e24Initial program 100.0%
Taylor expanded in t around 0 88.0%
mul-1-neg88.0%
distribute-rgt-neg-in88.0%
neg-sub088.0%
sub-neg88.0%
+-commutative88.0%
associate--r+88.0%
neg-sub088.0%
remove-double-neg88.0%
Simplified88.0%
Taylor expanded in z around 0 60.3%
*-rgt-identity60.3%
mul-1-neg60.3%
distribute-rgt-neg-out60.3%
distribute-lft-in60.3%
unsub-neg60.3%
Simplified60.3%
Final simplification71.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -3.5e-33)
t_1
(if (<= z -5.5e-162)
(* x (- 1.0 y))
(if (<= z 1.65e+19) (+ x (* y t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -3.5e-33) {
tmp = t_1;
} else if (z <= -5.5e-162) {
tmp = x * (1.0 - y);
} else if (z <= 1.65e+19) {
tmp = x + (y * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * (x - t)
if (z <= (-3.5d-33)) then
tmp = t_1
else if (z <= (-5.5d-162)) then
tmp = x * (1.0d0 - y)
else if (z <= 1.65d+19) then
tmp = x + (y * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -3.5e-33) {
tmp = t_1;
} else if (z <= -5.5e-162) {
tmp = x * (1.0 - y);
} else if (z <= 1.65e+19) {
tmp = x + (y * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -3.5e-33: tmp = t_1 elif z <= -5.5e-162: tmp = x * (1.0 - y) elif z <= 1.65e+19: tmp = x + (y * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -3.5e-33) tmp = t_1; elseif (z <= -5.5e-162) tmp = Float64(x * Float64(1.0 - y)); elseif (z <= 1.65e+19) tmp = Float64(x + Float64(y * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); tmp = 0.0; if (z <= -3.5e-33) tmp = t_1; elseif (z <= -5.5e-162) tmp = x * (1.0 - y); elseif (z <= 1.65e+19) tmp = x + (y * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e-33], t$95$1, If[LessEqual[z, -5.5e-162], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+19], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-162}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+19}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4999999999999999e-33 or 1.65e19 < z Initial program 100.0%
Taylor expanded in y around 0 82.5%
mul-1-neg82.5%
distribute-lft-neg-out82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in x around 0 80.2%
Taylor expanded in z around inf 80.8%
neg-mul-180.8%
unsub-neg80.8%
Simplified80.8%
if -3.4999999999999999e-33 < z < -5.50000000000000006e-162Initial program 99.9%
Taylor expanded in t around 0 76.9%
mul-1-neg76.9%
distribute-rgt-neg-in76.9%
neg-sub076.9%
sub-neg76.9%
+-commutative76.9%
associate--r+76.9%
neg-sub076.9%
remove-double-neg76.9%
Simplified76.9%
Taylor expanded in z around 0 76.9%
*-rgt-identity76.9%
mul-1-neg76.9%
distribute-rgt-neg-out76.9%
distribute-lft-in76.8%
unsub-neg76.8%
Simplified76.8%
if -5.50000000000000006e-162 < z < 1.65e19Initial program 100.0%
Taylor expanded in t around inf 84.3%
Taylor expanded in z around 0 76.6%
*-commutative76.6%
Simplified76.6%
Final simplification78.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -1.25e-34)
t_1
(if (<= z -1.95e-162)
(- x (* y x))
(if (<= z 1.7e+19) (+ x (* y t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -1.25e-34) {
tmp = t_1;
} else if (z <= -1.95e-162) {
tmp = x - (y * x);
} else if (z <= 1.7e+19) {
tmp = x + (y * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * (x - t)
if (z <= (-1.25d-34)) then
tmp = t_1
else if (z <= (-1.95d-162)) then
tmp = x - (y * x)
else if (z <= 1.7d+19) then
tmp = x + (y * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -1.25e-34) {
tmp = t_1;
} else if (z <= -1.95e-162) {
tmp = x - (y * x);
} else if (z <= 1.7e+19) {
tmp = x + (y * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -1.25e-34: tmp = t_1 elif z <= -1.95e-162: tmp = x - (y * x) elif z <= 1.7e+19: tmp = x + (y * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -1.25e-34) tmp = t_1; elseif (z <= -1.95e-162) tmp = Float64(x - Float64(y * x)); elseif (z <= 1.7e+19) tmp = Float64(x + Float64(y * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); tmp = 0.0; if (z <= -1.25e-34) tmp = t_1; elseif (z <= -1.95e-162) tmp = x - (y * x); elseif (z <= 1.7e+19) tmp = x + (y * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e-34], t$95$1, If[LessEqual[z, -1.95e-162], N[(x - N[(y * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+19], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-162}:\\
\;\;\;\;x - y \cdot x\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+19}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2500000000000001e-34 or 1.7e19 < z Initial program 100.0%
Taylor expanded in y around 0 82.5%
mul-1-neg82.5%
distribute-lft-neg-out82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in x around 0 80.2%
Taylor expanded in z around inf 80.8%
neg-mul-180.8%
unsub-neg80.8%
Simplified80.8%
if -1.2500000000000001e-34 < z < -1.95e-162Initial program 99.9%
Taylor expanded in t around 0 76.9%
mul-1-neg76.9%
distribute-rgt-neg-in76.9%
neg-sub076.9%
sub-neg76.9%
+-commutative76.9%
associate--r+76.9%
neg-sub076.9%
remove-double-neg76.9%
Simplified76.9%
Taylor expanded in z around 0 76.9%
*-rgt-identity76.9%
mul-1-neg76.9%
distribute-rgt-neg-out76.9%
distribute-lft-in76.8%
unsub-neg76.8%
Simplified76.8%
Taylor expanded in y around 0 76.9%
mul-1-neg76.9%
*-commutative76.9%
sub-neg76.9%
Simplified76.9%
if -1.95e-162 < z < 1.7e19Initial program 100.0%
Taylor expanded in t around inf 84.3%
Taylor expanded in z around 0 76.6%
*-commutative76.6%
Simplified76.6%
Final simplification78.7%
(FPCore (x y z t) :precision binary64 (if (<= y -2.95e-24) (* y t) (if (<= y -1.92e-121) (* z x) (if (<= y 3.6e-15) x (* y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.95e-24) {
tmp = y * t;
} else if (y <= -1.92e-121) {
tmp = z * x;
} else if (y <= 3.6e-15) {
tmp = x;
} else {
tmp = y * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.95d-24)) then
tmp = y * t
else if (y <= (-1.92d-121)) then
tmp = z * x
else if (y <= 3.6d-15) then
tmp = x
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.95e-24) {
tmp = y * t;
} else if (y <= -1.92e-121) {
tmp = z * x;
} else if (y <= 3.6e-15) {
tmp = x;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.95e-24: tmp = y * t elif y <= -1.92e-121: tmp = z * x elif y <= 3.6e-15: tmp = x else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.95e-24) tmp = Float64(y * t); elseif (y <= -1.92e-121) tmp = Float64(z * x); elseif (y <= 3.6e-15) tmp = x; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.95e-24) tmp = y * t; elseif (y <= -1.92e-121) tmp = z * x; elseif (y <= 3.6e-15) tmp = x; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.95e-24], N[(y * t), $MachinePrecision], If[LessEqual[y, -1.92e-121], N[(z * x), $MachinePrecision], If[LessEqual[y, 3.6e-15], x, N[(y * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.95 \cdot 10^{-24}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -1.92 \cdot 10^{-121}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -2.9500000000000001e-24 or 3.6000000000000001e-15 < y Initial program 100.0%
Taylor expanded in t around inf 58.5%
Taylor expanded in y around inf 45.4%
*-commutative45.4%
Simplified45.4%
if -2.9500000000000001e-24 < y < -1.9199999999999999e-121Initial program 99.9%
Taylor expanded in y around 0 90.9%
mul-1-neg90.9%
distribute-lft-neg-out90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in t around 0 68.1%
Taylor expanded in z around inf 49.1%
*-commutative49.1%
Simplified49.1%
if -1.9199999999999999e-121 < y < 3.6000000000000001e-15Initial program 100.0%
Taylor expanded in t around inf 83.8%
Taylor expanded in x around inf 37.6%
Final simplification42.4%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5.2e+39) (not (<= x 4.4e+105))) (+ x (* x (- z y))) (+ x (* t (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.2e+39) || !(x <= 4.4e+105)) {
tmp = x + (x * (z - y));
} else {
tmp = x + (t * (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-5.2d+39)) .or. (.not. (x <= 4.4d+105))) then
tmp = x + (x * (z - y))
else
tmp = x + (t * (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.2e+39) || !(x <= 4.4e+105)) {
tmp = x + (x * (z - y));
} else {
tmp = x + (t * (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5.2e+39) or not (x <= 4.4e+105): tmp = x + (x * (z - y)) else: tmp = x + (t * (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5.2e+39) || !(x <= 4.4e+105)) tmp = Float64(x + Float64(x * Float64(z - y))); else tmp = Float64(x + Float64(t * Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -5.2e+39) || ~((x <= 4.4e+105))) tmp = x + (x * (z - y)); else tmp = x + (t * (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5.2e+39], N[Not[LessEqual[x, 4.4e+105]], $MachinePrecision]], N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+39} \lor \neg \left(x \leq 4.4 \cdot 10^{+105}\right):\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \left(y - z\right)\\
\end{array}
\end{array}
if x < -5.2e39 or 4.40000000000000014e105 < x Initial program 100.0%
Taylor expanded in t around 0 93.3%
mul-1-neg93.3%
distribute-rgt-neg-in93.3%
neg-sub093.3%
sub-neg93.3%
+-commutative93.3%
associate--r+93.3%
neg-sub093.3%
remove-double-neg93.3%
Simplified93.3%
if -5.2e39 < x < 4.40000000000000014e105Initial program 100.0%
Taylor expanded in t around inf 83.5%
Final simplification87.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6.6e-34) (not (<= z 6.5e+19))) (- x (* z (- t x))) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.6e-34) || !(z <= 6.5e+19)) {
tmp = x - (z * (t - x));
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-6.6d-34)) .or. (.not. (z <= 6.5d+19))) then
tmp = x - (z * (t - x))
else
tmp = x + (y * (t - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.6e-34) || !(z <= 6.5e+19)) {
tmp = x - (z * (t - x));
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6.6e-34) or not (z <= 6.5e+19): tmp = x - (z * (t - x)) else: tmp = x + (y * (t - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6.6e-34) || !(z <= 6.5e+19)) tmp = Float64(x - Float64(z * Float64(t - x))); else tmp = Float64(x + Float64(y * Float64(t - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6.6e-34) || ~((z <= 6.5e+19))) tmp = x - (z * (t - x)); else tmp = x + (y * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.6e-34], N[Not[LessEqual[z, 6.5e+19]], $MachinePrecision]], N[(x - N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{-34} \lor \neg \left(z \leq 6.5 \cdot 10^{+19}\right):\\
\;\;\;\;x - z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -6.59999999999999965e-34 or 6.5e19 < z Initial program 100.0%
Taylor expanded in y around 0 82.5%
mul-1-neg82.5%
distribute-lft-neg-out82.5%
*-commutative82.5%
Simplified82.5%
distribute-rgt-neg-out82.5%
unsub-neg82.5%
Applied egg-rr82.5%
if -6.59999999999999965e-34 < z < 6.5e19Initial program 100.0%
Taylor expanded in y around inf 91.9%
*-commutative91.9%
Simplified91.9%
Final simplification87.3%
(FPCore (x y z t) :precision binary64 (if (or (<= t -4e-7) (not (<= t 3.4e+24))) (* t (- y z)) (* x (- 1.0 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4e-7) || !(t <= 3.4e+24)) {
tmp = t * (y - z);
} else {
tmp = x * (1.0 - y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-4d-7)) .or. (.not. (t <= 3.4d+24))) then
tmp = t * (y - z)
else
tmp = x * (1.0d0 - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4e-7) || !(t <= 3.4e+24)) {
tmp = t * (y - z);
} else {
tmp = x * (1.0 - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -4e-7) or not (t <= 3.4e+24): tmp = t * (y - z) else: tmp = x * (1.0 - y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -4e-7) || !(t <= 3.4e+24)) tmp = Float64(t * Float64(y - z)); else tmp = Float64(x * Float64(1.0 - y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -4e-7) || ~((t <= 3.4e+24))) tmp = t * (y - z); else tmp = x * (1.0 - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -4e-7], N[Not[LessEqual[t, 3.4e+24]], $MachinePrecision]], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{-7} \lor \neg \left(t \leq 3.4 \cdot 10^{+24}\right):\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\end{array}
\end{array}
if t < -3.9999999999999998e-7 or 3.4000000000000001e24 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in92.8%
Applied egg-rr92.8%
Taylor expanded in x around 0 80.5%
associate-+r+80.5%
mul-1-neg80.5%
*-commutative80.5%
sub-neg80.5%
associate-+l-80.5%
*-commutative80.5%
Applied egg-rr80.5%
Taylor expanded in x around 0 74.3%
distribute-lft-out--80.1%
Simplified80.1%
if -3.9999999999999998e-7 < t < 3.4000000000000001e24Initial program 100.0%
Taylor expanded in t around 0 85.4%
mul-1-neg85.4%
distribute-rgt-neg-in85.4%
neg-sub085.4%
sub-neg85.4%
+-commutative85.4%
associate--r+85.4%
neg-sub085.4%
remove-double-neg85.4%
Simplified85.4%
Taylor expanded in z around 0 56.2%
*-rgt-identity56.2%
mul-1-neg56.2%
distribute-rgt-neg-out56.2%
distribute-lft-in56.2%
unsub-neg56.2%
Simplified56.2%
Final simplification69.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -6.5e-9) (not (<= t 1.46e-7))) (* t (- y z)) (+ x (* z x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.5e-9) || !(t <= 1.46e-7)) {
tmp = t * (y - z);
} else {
tmp = x + (z * x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-6.5d-9)) .or. (.not. (t <= 1.46d-7))) then
tmp = t * (y - z)
else
tmp = x + (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.5e-9) || !(t <= 1.46e-7)) {
tmp = t * (y - z);
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -6.5e-9) or not (t <= 1.46e-7): tmp = t * (y - z) else: tmp = x + (z * x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -6.5e-9) || !(t <= 1.46e-7)) tmp = Float64(t * Float64(y - z)); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -6.5e-9) || ~((t <= 1.46e-7))) tmp = t * (y - z); else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -6.5e-9], N[Not[LessEqual[t, 1.46e-7]], $MachinePrecision]], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-9} \lor \neg \left(t \leq 1.46 \cdot 10^{-7}\right):\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if t < -6.5000000000000003e-9 or 1.4600000000000001e-7 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in93.2%
Applied egg-rr93.2%
Taylor expanded in x around 0 79.1%
associate-+r+79.1%
mul-1-neg79.1%
*-commutative79.1%
sub-neg79.1%
associate-+l-79.1%
*-commutative79.1%
Applied egg-rr79.1%
Taylor expanded in x around 0 72.6%
distribute-lft-out--78.0%
Simplified78.0%
if -6.5000000000000003e-9 < t < 1.4600000000000001e-7Initial program 100.0%
Taylor expanded in y around 0 73.8%
mul-1-neg73.8%
distribute-lft-neg-out73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in t around 0 67.8%
Final simplification73.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.1e-12) (not (<= y 2.8e-12))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-12) || !(y <= 2.8e-12)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.1d-12)) .or. (.not. (y <= 2.8d-12))) then
tmp = y * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-12) || !(y <= 2.8e-12)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.1e-12) or not (y <= 2.8e-12): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.1e-12) || !(y <= 2.8e-12)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.1e-12) || ~((y <= 2.8e-12))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.1e-12], N[Not[LessEqual[y, 2.8e-12]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-12} \lor \neg \left(y \leq 2.8 \cdot 10^{-12}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.09999999999999996e-12 or 2.8000000000000002e-12 < y Initial program 100.0%
Taylor expanded in t around inf 57.9%
Taylor expanded in y around inf 46.1%
*-commutative46.1%
Simplified46.1%
if -1.09999999999999996e-12 < y < 2.8000000000000002e-12Initial program 100.0%
Taylor expanded in t around inf 78.2%
Taylor expanded in x around inf 35.1%
Final simplification40.3%
(FPCore (x y z t) :precision binary64 (+ x (* (- t x) (- y z))))
double code(double x, double y, double z, double t) {
return x + ((t - x) * (y - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((t - x) * (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t - x) * (y - z));
}
def code(x, y, z, t): return x + ((t - x) * (y - z))
function code(x, y, z, t) return Float64(x + Float64(Float64(t - x) * Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x + ((t - x) * (y - z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right) \cdot \left(y - z\right)
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in t around inf 68.5%
Taylor expanded in x around inf 19.8%
Final simplification19.8%
(FPCore (x y z t) :precision binary64 (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((t * (y - z)) + (-x * (y - z)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
def code(x, y, z, t): return x + ((t * (y - z)) + (-x * (y - z)))
function code(x, y, z, t) return Float64(x + Float64(Float64(t * Float64(y - z)) + Float64(Float64(-x) * Float64(y - z)))) end
function tmp = code(x, y, z, t) tmp = x + ((t * (y - z)) + (-x * (y - z))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] + N[((-x) * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)
\end{array}
herbie shell --seed 2024041
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:herbie-target
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))