
(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 17 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 (* (- y z) t)))
(if (<= (- y z) -1e-15)
t_1
(if (<= (- y z) 2e-88)
x
(if (or (<= (- y z) 2e+101) (not (<= (- y z) 1e+163))) t_1 (* z x))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if ((y - z) <= -1e-15) {
tmp = t_1;
} else if ((y - z) <= 2e-88) {
tmp = x;
} else if (((y - z) <= 2e+101) || !((y - z) <= 1e+163)) {
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 = (y - z) * t
if ((y - z) <= (-1d-15)) then
tmp = t_1
else if ((y - z) <= 2d-88) then
tmp = x
else if (((y - z) <= 2d+101) .or. (.not. ((y - z) <= 1d+163))) 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 = (y - z) * t;
double tmp;
if ((y - z) <= -1e-15) {
tmp = t_1;
} else if ((y - z) <= 2e-88) {
tmp = x;
} else if (((y - z) <= 2e+101) || !((y - z) <= 1e+163)) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t tmp = 0 if (y - z) <= -1e-15: tmp = t_1 elif (y - z) <= 2e-88: tmp = x elif ((y - z) <= 2e+101) or not ((y - z) <= 1e+163): tmp = t_1 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) tmp = 0.0 if (Float64(y - z) <= -1e-15) tmp = t_1; elseif (Float64(y - z) <= 2e-88) tmp = x; elseif ((Float64(y - z) <= 2e+101) || !(Float64(y - z) <= 1e+163)) tmp = t_1; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; tmp = 0.0; if ((y - z) <= -1e-15) tmp = t_1; elseif ((y - z) <= 2e-88) tmp = x; elseif (((y - z) <= 2e+101) || ~(((y - z) <= 1e+163))) tmp = t_1; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(y - z), $MachinePrecision], -1e-15], t$95$1, If[LessEqual[N[(y - z), $MachinePrecision], 2e-88], x, If[Or[LessEqual[N[(y - z), $MachinePrecision], 2e+101], N[Not[LessEqual[N[(y - z), $MachinePrecision], 1e+163]], $MachinePrecision]], t$95$1, N[(z * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
\mathbf{if}\;y - z \leq -1 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y - z \leq 2 \cdot 10^{-88}:\\
\;\;\;\;x\\
\mathbf{elif}\;y - z \leq 2 \cdot 10^{+101} \lor \neg \left(y - z \leq 10^{+163}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if (-.f64 y z) < -1.0000000000000001e-15 or 1.99999999999999987e-88 < (-.f64 y z) < 2e101 or 9.9999999999999994e162 < (-.f64 y z) Initial program 100.0%
Taylor expanded in t around inf 58.8%
Taylor expanded in x around 0 57.0%
if -1.0000000000000001e-15 < (-.f64 y z) < 1.99999999999999987e-88Initial program 100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around inf 81.8%
if 2e101 < (-.f64 y z) < 9.9999999999999994e162Initial program 100.0%
Taylor expanded in x around inf 73.9%
mul-1-neg73.9%
unsub-neg73.9%
Simplified73.9%
Taylor expanded in z around inf 59.1%
Final simplification61.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= y -1.9e+57)
(* x (- y))
(if (<= y -1.75e-102)
(* z x)
(if (<= y -7.5e-203)
t_1
(if (<= y -1.6e-305) x (if (<= y 4.6e-29) t_1 (* y t))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (y <= -1.9e+57) {
tmp = x * -y;
} else if (y <= -1.75e-102) {
tmp = z * x;
} else if (y <= -7.5e-203) {
tmp = t_1;
} else if (y <= -1.6e-305) {
tmp = x;
} else if (y <= 4.6e-29) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z * -t
if (y <= (-1.9d+57)) then
tmp = x * -y
else if (y <= (-1.75d-102)) then
tmp = z * x
else if (y <= (-7.5d-203)) then
tmp = t_1
else if (y <= (-1.6d-305)) then
tmp = x
else if (y <= 4.6d-29) then
tmp = t_1
else
tmp = y * t
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 (y <= -1.9e+57) {
tmp = x * -y;
} else if (y <= -1.75e-102) {
tmp = z * x;
} else if (y <= -7.5e-203) {
tmp = t_1;
} else if (y <= -1.6e-305) {
tmp = x;
} else if (y <= 4.6e-29) {
tmp = t_1;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if y <= -1.9e+57: tmp = x * -y elif y <= -1.75e-102: tmp = z * x elif y <= -7.5e-203: tmp = t_1 elif y <= -1.6e-305: tmp = x elif y <= 4.6e-29: tmp = t_1 else: tmp = y * t return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (y <= -1.9e+57) tmp = Float64(x * Float64(-y)); elseif (y <= -1.75e-102) tmp = Float64(z * x); elseif (y <= -7.5e-203) tmp = t_1; elseif (y <= -1.6e-305) tmp = x; elseif (y <= 4.6e-29) tmp = t_1; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (y <= -1.9e+57) tmp = x * -y; elseif (y <= -1.75e-102) tmp = z * x; elseif (y <= -7.5e-203) tmp = t_1; elseif (y <= -1.6e-305) tmp = x; elseif (y <= 4.6e-29) tmp = t_1; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[y, -1.9e+57], N[(x * (-y)), $MachinePrecision], If[LessEqual[y, -1.75e-102], N[(z * x), $MachinePrecision], If[LessEqual[y, -7.5e-203], t$95$1, If[LessEqual[y, -1.6e-305], x, If[LessEqual[y, 4.6e-29], t$95$1, N[(y * t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+57}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-102}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-203}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-305}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -1.8999999999999999e57Initial program 100.0%
Taylor expanded in x around inf 60.1%
mul-1-neg60.1%
unsub-neg60.1%
Simplified60.1%
Taylor expanded in y around inf 56.8%
mul-1-neg56.8%
distribute-lft-neg-out56.8%
*-commutative56.8%
Simplified56.8%
if -1.8999999999999999e57 < y < -1.74999999999999993e-102Initial program 100.0%
Taylor expanded in x around inf 77.4%
mul-1-neg77.4%
unsub-neg77.4%
Simplified77.4%
Taylor expanded in z around inf 40.5%
if -1.74999999999999993e-102 < y < -7.50000000000000027e-203 or -1.60000000000000004e-305 < y < 4.59999999999999982e-29Initial program 100.0%
Taylor expanded in t around inf 81.6%
Taylor expanded in z around inf 51.7%
associate-*r*51.7%
mul-1-neg51.7%
Simplified51.7%
if -7.50000000000000027e-203 < y < -1.60000000000000004e-305Initial program 99.9%
Taylor expanded in t around inf 74.2%
Taylor expanded in x around inf 52.8%
if 4.59999999999999982e-29 < y Initial program 100.0%
Taylor expanded in t around inf 59.0%
Taylor expanded in y around inf 43.6%
*-commutative43.6%
Simplified43.6%
Final simplification49.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))) (t_2 (+ x (* y (- t x)))))
(if (<= z -1.12e+36)
t_1
(if (<= z -6e+18)
t_2
(if (<= z -1.7e-33)
(- x (* t (- z y)))
(if (<= z 1.75e+28) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = x + (y * (t - x));
double tmp;
if (z <= -1.12e+36) {
tmp = t_1;
} else if (z <= -6e+18) {
tmp = t_2;
} else if (z <= -1.7e-33) {
tmp = x - (t * (z - y));
} else if (z <= 1.75e+28) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = z * (x - t)
t_2 = x + (y * (t - x))
if (z <= (-1.12d+36)) then
tmp = t_1
else if (z <= (-6d+18)) then
tmp = t_2
else if (z <= (-1.7d-33)) then
tmp = x - (t * (z - y))
else if (z <= 1.75d+28) then
tmp = t_2
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 t_2 = x + (y * (t - x));
double tmp;
if (z <= -1.12e+36) {
tmp = t_1;
} else if (z <= -6e+18) {
tmp = t_2;
} else if (z <= -1.7e-33) {
tmp = x - (t * (z - y));
} else if (z <= 1.75e+28) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) t_2 = x + (y * (t - x)) tmp = 0 if z <= -1.12e+36: tmp = t_1 elif z <= -6e+18: tmp = t_2 elif z <= -1.7e-33: tmp = x - (t * (z - y)) elif z <= 1.75e+28: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) t_2 = Float64(x + Float64(y * Float64(t - x))) tmp = 0.0 if (z <= -1.12e+36) tmp = t_1; elseif (z <= -6e+18) tmp = t_2; elseif (z <= -1.7e-33) tmp = Float64(x - Float64(t * Float64(z - y))); elseif (z <= 1.75e+28) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); t_2 = x + (y * (t - x)); tmp = 0.0; if (z <= -1.12e+36) tmp = t_1; elseif (z <= -6e+18) tmp = t_2; elseif (z <= -1.7e-33) tmp = x - (t * (z - y)); elseif (z <= 1.75e+28) tmp = t_2; 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]}, Block[{t$95$2 = N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.12e+36], t$95$1, If[LessEqual[z, -6e+18], t$95$2, If[LessEqual[z, -1.7e-33], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+28], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := x + y \cdot \left(t - x\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-33}:\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+28}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.11999999999999999e36 or 1.75e28 < z Initial program 100.0%
Taylor expanded in y around 0 82.7%
mul-1-neg82.7%
unsub-neg82.7%
Simplified82.7%
sub-neg82.7%
distribute-lft-in79.3%
Applied egg-rr79.3%
Taylor expanded in z around inf 82.7%
mul-1-neg82.7%
distribute-rgt-neg-in82.7%
+-commutative82.7%
distribute-neg-in82.7%
unsub-neg82.7%
mul-1-neg82.7%
remove-double-neg82.7%
Simplified82.7%
if -1.11999999999999999e36 < z < -6e18 or -1.7e-33 < z < 1.75e28Initial program 100.0%
Taylor expanded in y around inf 95.2%
*-commutative95.2%
Simplified95.2%
if -6e18 < z < -1.7e-33Initial program 100.0%
Taylor expanded in t around inf 74.3%
Final simplification88.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (- t x)))))
(if (<= y -1.06e+89)
t_1
(if (<= y -4500000000.0)
(* x (+ (- z y) 1.0))
(if (<= y -7.2e-16)
(- x (* t (- z y)))
(if (<= y 6e-5) (+ x (* z (- x t))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (t - x));
double tmp;
if (y <= -1.06e+89) {
tmp = t_1;
} else if (y <= -4500000000.0) {
tmp = x * ((z - y) + 1.0);
} else if (y <= -7.2e-16) {
tmp = x - (t * (z - y));
} else if (y <= 6e-5) {
tmp = x + (z * (x - 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 = x + (y * (t - x))
if (y <= (-1.06d+89)) then
tmp = t_1
else if (y <= (-4500000000.0d0)) then
tmp = x * ((z - y) + 1.0d0)
else if (y <= (-7.2d-16)) then
tmp = x - (t * (z - y))
else if (y <= 6d-5) then
tmp = x + (z * (x - 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 = x + (y * (t - x));
double tmp;
if (y <= -1.06e+89) {
tmp = t_1;
} else if (y <= -4500000000.0) {
tmp = x * ((z - y) + 1.0);
} else if (y <= -7.2e-16) {
tmp = x - (t * (z - y));
} else if (y <= 6e-5) {
tmp = x + (z * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (t - x)) tmp = 0 if y <= -1.06e+89: tmp = t_1 elif y <= -4500000000.0: tmp = x * ((z - y) + 1.0) elif y <= -7.2e-16: tmp = x - (t * (z - y)) elif y <= 6e-5: tmp = x + (z * (x - t)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(t - x))) tmp = 0.0 if (y <= -1.06e+89) tmp = t_1; elseif (y <= -4500000000.0) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); elseif (y <= -7.2e-16) tmp = Float64(x - Float64(t * Float64(z - y))); elseif (y <= 6e-5) tmp = Float64(x + Float64(z * Float64(x - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (t - x)); tmp = 0.0; if (y <= -1.06e+89) tmp = t_1; elseif (y <= -4500000000.0) tmp = x * ((z - y) + 1.0); elseif (y <= -7.2e-16) tmp = x - (t * (z - y)); elseif (y <= 6e-5) tmp = x + (z * (x - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.06e+89], t$95$1, If[LessEqual[y, -4500000000.0], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.2e-16], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-5], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4500000000:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-16}:\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-5}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.05999999999999997e89 or 6.00000000000000015e-5 < y Initial program 100.0%
Taylor expanded in y around inf 84.0%
*-commutative84.0%
Simplified84.0%
if -1.05999999999999997e89 < y < -4.5e9Initial program 100.0%
Taylor expanded in x around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
Simplified86.0%
if -4.5e9 < y < -7.19999999999999965e-16Initial program 100.0%
Taylor expanded in t around inf 84.2%
if -7.19999999999999965e-16 < y < 6.00000000000000015e-5Initial program 100.0%
Taylor expanded in y around 0 94.2%
mul-1-neg94.2%
unsub-neg94.2%
Simplified94.2%
Final simplification89.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (- t x)))))
(if (<= y -1e+89)
t_1
(if (<= y -32000000000000.0)
(* x (+ (- z y) 1.0))
(if (<= y -1.35e-15)
(* t (- (+ y (/ x t)) z))
(if (<= y 8.8e-5) (+ x (* z (- x t))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (t - x));
double tmp;
if (y <= -1e+89) {
tmp = t_1;
} else if (y <= -32000000000000.0) {
tmp = x * ((z - y) + 1.0);
} else if (y <= -1.35e-15) {
tmp = t * ((y + (x / t)) - z);
} else if (y <= 8.8e-5) {
tmp = x + (z * (x - 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 = x + (y * (t - x))
if (y <= (-1d+89)) then
tmp = t_1
else if (y <= (-32000000000000.0d0)) then
tmp = x * ((z - y) + 1.0d0)
else if (y <= (-1.35d-15)) then
tmp = t * ((y + (x / t)) - z)
else if (y <= 8.8d-5) then
tmp = x + (z * (x - 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 = x + (y * (t - x));
double tmp;
if (y <= -1e+89) {
tmp = t_1;
} else if (y <= -32000000000000.0) {
tmp = x * ((z - y) + 1.0);
} else if (y <= -1.35e-15) {
tmp = t * ((y + (x / t)) - z);
} else if (y <= 8.8e-5) {
tmp = x + (z * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (t - x)) tmp = 0 if y <= -1e+89: tmp = t_1 elif y <= -32000000000000.0: tmp = x * ((z - y) + 1.0) elif y <= -1.35e-15: tmp = t * ((y + (x / t)) - z) elif y <= 8.8e-5: tmp = x + (z * (x - t)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(t - x))) tmp = 0.0 if (y <= -1e+89) tmp = t_1; elseif (y <= -32000000000000.0) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); elseif (y <= -1.35e-15) tmp = Float64(t * Float64(Float64(y + Float64(x / t)) - z)); elseif (y <= 8.8e-5) tmp = Float64(x + Float64(z * Float64(x - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (t - x)); tmp = 0.0; if (y <= -1e+89) tmp = t_1; elseif (y <= -32000000000000.0) tmp = x * ((z - y) + 1.0); elseif (y <= -1.35e-15) tmp = t * ((y + (x / t)) - z); elseif (y <= 8.8e-5) tmp = x + (z * (x - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+89], t$95$1, If[LessEqual[y, -32000000000000.0], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e-15], N[(t * N[(N[(y + N[(x / t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.8e-5], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -1 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -32000000000000:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-15}:\\
\;\;\;\;t \cdot \left(\left(y + \frac{x}{t}\right) - z\right)\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-5}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.99999999999999995e88 or 8.7999999999999998e-5 < y Initial program 100.0%
Taylor expanded in y around inf 84.0%
*-commutative84.0%
Simplified84.0%
if -9.99999999999999995e88 < y < -3.2e13Initial program 100.0%
Taylor expanded in x around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
Simplified86.0%
if -3.2e13 < y < -1.35000000000000005e-15Initial program 100.0%
Taylor expanded in t around inf 84.2%
Taylor expanded in t around inf 84.2%
if -1.35000000000000005e-15 < y < 8.7999999999999998e-5Initial program 100.0%
Taylor expanded in y around 0 94.2%
mul-1-neg94.2%
unsub-neg94.2%
Simplified94.2%
Final simplification89.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))) (t_2 (* x (- 1.0 y))))
(if (<= z -2e-74)
t_1
(if (<= z 2.4e-92)
t_2
(if (<= z 11000.0) (* (- y z) t) (if (<= z 6.4e+27) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = x * (1.0 - y);
double tmp;
if (z <= -2e-74) {
tmp = t_1;
} else if (z <= 2.4e-92) {
tmp = t_2;
} else if (z <= 11000.0) {
tmp = (y - z) * t;
} else if (z <= 6.4e+27) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = z * (x - t)
t_2 = x * (1.0d0 - y)
if (z <= (-2d-74)) then
tmp = t_1
else if (z <= 2.4d-92) then
tmp = t_2
else if (z <= 11000.0d0) then
tmp = (y - z) * t
else if (z <= 6.4d+27) then
tmp = t_2
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 t_2 = x * (1.0 - y);
double tmp;
if (z <= -2e-74) {
tmp = t_1;
} else if (z <= 2.4e-92) {
tmp = t_2;
} else if (z <= 11000.0) {
tmp = (y - z) * t;
} else if (z <= 6.4e+27) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) t_2 = x * (1.0 - y) tmp = 0 if z <= -2e-74: tmp = t_1 elif z <= 2.4e-92: tmp = t_2 elif z <= 11000.0: tmp = (y - z) * t elif z <= 6.4e+27: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) t_2 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (z <= -2e-74) tmp = t_1; elseif (z <= 2.4e-92) tmp = t_2; elseif (z <= 11000.0) tmp = Float64(Float64(y - z) * t); elseif (z <= 6.4e+27) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); t_2 = x * (1.0 - y); tmp = 0.0; if (z <= -2e-74) tmp = t_1; elseif (z <= 2.4e-92) tmp = t_2; elseif (z <= 11000.0) tmp = (y - z) * t; elseif (z <= 6.4e+27) tmp = t_2; 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]}, Block[{t$95$2 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e-74], t$95$1, If[LessEqual[z, 2.4e-92], t$95$2, If[LessEqual[z, 11000.0], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 6.4e+27], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-92}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 11000:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.99999999999999992e-74 or 6.4000000000000003e27 < z Initial program 100.0%
Taylor expanded in y around 0 78.6%
mul-1-neg78.6%
unsub-neg78.6%
Simplified78.6%
sub-neg78.6%
distribute-lft-in75.6%
Applied egg-rr75.6%
Taylor expanded in z around inf 77.4%
mul-1-neg77.4%
distribute-rgt-neg-in77.4%
+-commutative77.4%
distribute-neg-in77.4%
unsub-neg77.4%
mul-1-neg77.4%
remove-double-neg77.4%
Simplified77.4%
if -1.99999999999999992e-74 < z < 2.4000000000000001e-92 or 11000 < z < 6.4000000000000003e27Initial program 100.0%
Taylor expanded in x around inf 73.7%
mul-1-neg73.7%
unsub-neg73.7%
Simplified73.7%
Taylor expanded in z around 0 72.8%
if 2.4000000000000001e-92 < z < 11000Initial program 100.0%
Taylor expanded in t around inf 93.8%
Taylor expanded in x around 0 74.4%
Final simplification75.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -8.4e-75)
t_1
(if (<= z 3.25e-90)
(- x (* y x))
(if (<= z 110000.0)
(* (- y z) t)
(if (<= z 6.4e+27) (* x (- 1.0 y)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -8.4e-75) {
tmp = t_1;
} else if (z <= 3.25e-90) {
tmp = x - (y * x);
} else if (z <= 110000.0) {
tmp = (y - z) * t;
} else if (z <= 6.4e+27) {
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 = z * (x - t)
if (z <= (-8.4d-75)) then
tmp = t_1
else if (z <= 3.25d-90) then
tmp = x - (y * x)
else if (z <= 110000.0d0) then
tmp = (y - z) * t
else if (z <= 6.4d+27) 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 = z * (x - t);
double tmp;
if (z <= -8.4e-75) {
tmp = t_1;
} else if (z <= 3.25e-90) {
tmp = x - (y * x);
} else if (z <= 110000.0) {
tmp = (y - z) * t;
} else if (z <= 6.4e+27) {
tmp = x * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -8.4e-75: tmp = t_1 elif z <= 3.25e-90: tmp = x - (y * x) elif z <= 110000.0: tmp = (y - z) * t elif z <= 6.4e+27: tmp = x * (1.0 - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -8.4e-75) tmp = t_1; elseif (z <= 3.25e-90) tmp = Float64(x - Float64(y * x)); elseif (z <= 110000.0) tmp = Float64(Float64(y - z) * t); elseif (z <= 6.4e+27) 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 = z * (x - t); tmp = 0.0; if (z <= -8.4e-75) tmp = t_1; elseif (z <= 3.25e-90) tmp = x - (y * x); elseif (z <= 110000.0) tmp = (y - z) * t; elseif (z <= 6.4e+27) tmp = x * (1.0 - y); 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, -8.4e-75], t$95$1, If[LessEqual[z, 3.25e-90], N[(x - N[(y * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 110000.0], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 6.4e+27], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -8.4 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{-90}:\\
\;\;\;\;x - y \cdot x\\
\mathbf{elif}\;z \leq 110000:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.4000000000000004e-75 or 6.4000000000000003e27 < z Initial program 100.0%
Taylor expanded in y around 0 78.6%
mul-1-neg78.6%
unsub-neg78.6%
Simplified78.6%
sub-neg78.6%
distribute-lft-in75.6%
Applied egg-rr75.6%
Taylor expanded in z around inf 77.4%
mul-1-neg77.4%
distribute-rgt-neg-in77.4%
+-commutative77.4%
distribute-neg-in77.4%
unsub-neg77.4%
mul-1-neg77.4%
remove-double-neg77.4%
Simplified77.4%
if -8.4000000000000004e-75 < z < 3.2499999999999998e-90Initial program 100.0%
Taylor expanded in x around inf 72.2%
mul-1-neg72.2%
unsub-neg72.2%
Simplified72.2%
Taylor expanded in z around 0 72.2%
sub-neg72.2%
distribute-rgt-in72.2%
*-un-lft-identity72.2%
Applied egg-rr72.2%
if 3.2499999999999998e-90 < z < 1.1e5Initial program 100.0%
Taylor expanded in t around inf 93.8%
Taylor expanded in x around 0 74.4%
if 1.1e5 < z < 6.4000000000000003e27Initial program 99.8%
Taylor expanded in x around inf 89.7%
mul-1-neg89.7%
unsub-neg89.7%
Simplified89.7%
Taylor expanded in z around 0 79.7%
Final simplification75.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- y))))
(if (<= y -1.0)
t_1
(if (<= y 5.5e-129)
x
(if (or (<= y 7.4e+144) (not (<= y 1.6e+192))) (* y t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * -y;
double tmp;
if (y <= -1.0) {
tmp = t_1;
} else if (y <= 5.5e-129) {
tmp = x;
} else if ((y <= 7.4e+144) || !(y <= 1.6e+192)) {
tmp = 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 = x * -y
if (y <= (-1.0d0)) then
tmp = t_1
else if (y <= 5.5d-129) then
tmp = x
else if ((y <= 7.4d+144) .or. (.not. (y <= 1.6d+192))) then
tmp = 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 = x * -y;
double tmp;
if (y <= -1.0) {
tmp = t_1;
} else if (y <= 5.5e-129) {
tmp = x;
} else if ((y <= 7.4e+144) || !(y <= 1.6e+192)) {
tmp = y * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * -y tmp = 0 if y <= -1.0: tmp = t_1 elif y <= 5.5e-129: tmp = x elif (y <= 7.4e+144) or not (y <= 1.6e+192): tmp = y * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(-y)) tmp = 0.0 if (y <= -1.0) tmp = t_1; elseif (y <= 5.5e-129) tmp = x; elseif ((y <= 7.4e+144) || !(y <= 1.6e+192)) tmp = Float64(y * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * -y; tmp = 0.0; if (y <= -1.0) tmp = t_1; elseif (y <= 5.5e-129) tmp = x; elseif ((y <= 7.4e+144) || ~((y <= 1.6e+192))) tmp = y * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * (-y)), $MachinePrecision]}, If[LessEqual[y, -1.0], t$95$1, If[LessEqual[y, 5.5e-129], x, If[Or[LessEqual[y, 7.4e+144], N[Not[LessEqual[y, 1.6e+192]], $MachinePrecision]], N[(y * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+144} \lor \neg \left(y \leq 1.6 \cdot 10^{+192}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1 or 7.3999999999999993e144 < y < 1.60000000000000012e192Initial program 100.0%
Taylor expanded in x around inf 63.6%
mul-1-neg63.6%
unsub-neg63.6%
Simplified63.6%
Taylor expanded in y around inf 56.8%
mul-1-neg56.8%
distribute-lft-neg-out56.8%
*-commutative56.8%
Simplified56.8%
if -1 < y < 5.50000000000000023e-129Initial program 100.0%
Taylor expanded in t around inf 74.8%
Taylor expanded in x around inf 37.3%
if 5.50000000000000023e-129 < y < 7.3999999999999993e144 or 1.60000000000000012e192 < y Initial program 100.0%
Taylor expanded in t around inf 67.1%
Taylor expanded in y around inf 41.6%
*-commutative41.6%
Simplified41.6%
Final simplification44.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 y))))
(if (<= x -3.5e+70)
t_1
(if (<= x -5e+20)
(* x (+ z 1.0))
(if (<= x 5.4e+56) (* (- y z) t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - y);
double tmp;
if (x <= -3.5e+70) {
tmp = t_1;
} else if (x <= -5e+20) {
tmp = x * (z + 1.0);
} else if (x <= 5.4e+56) {
tmp = (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 = x * (1.0d0 - y)
if (x <= (-3.5d+70)) then
tmp = t_1
else if (x <= (-5d+20)) then
tmp = x * (z + 1.0d0)
else if (x <= 5.4d+56) then
tmp = (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 = x * (1.0 - y);
double tmp;
if (x <= -3.5e+70) {
tmp = t_1;
} else if (x <= -5e+20) {
tmp = x * (z + 1.0);
} else if (x <= 5.4e+56) {
tmp = (y - z) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - y) tmp = 0 if x <= -3.5e+70: tmp = t_1 elif x <= -5e+20: tmp = x * (z + 1.0) elif x <= 5.4e+56: tmp = (y - z) * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (x <= -3.5e+70) tmp = t_1; elseif (x <= -5e+20) tmp = Float64(x * Float64(z + 1.0)); elseif (x <= 5.4e+56) tmp = Float64(Float64(y - z) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - y); tmp = 0.0; if (x <= -3.5e+70) tmp = t_1; elseif (x <= -5e+20) tmp = x * (z + 1.0); elseif (x <= 5.4e+56) tmp = (y - z) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.5e+70], t$95$1, If[LessEqual[x, -5e+20], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.4e+56], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5 \cdot 10^{+20}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{+56}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.50000000000000002e70 or 5.40000000000000019e56 < x Initial program 100.0%
Taylor expanded in x around inf 88.9%
mul-1-neg88.9%
unsub-neg88.9%
Simplified88.9%
Taylor expanded in z around 0 68.8%
if -3.50000000000000002e70 < x < -5e20Initial program 100.0%
Taylor expanded in x around inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
Simplified80.8%
Taylor expanded in y around 0 74.2%
+-commutative74.2%
Simplified74.2%
if -5e20 < x < 5.40000000000000019e56Initial program 100.0%
Taylor expanded in t around inf 81.4%
Taylor expanded in x around 0 71.2%
Final simplification70.4%
(FPCore (x y z t) :precision binary64 (if (<= y -2.6e+89) (* y t) (if (<= y -5e-49) (* z x) (if (<= y 5.5e-129) x (* y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e+89) {
tmp = y * t;
} else if (y <= -5e-49) {
tmp = z * x;
} else if (y <= 5.5e-129) {
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.6d+89)) then
tmp = y * t
else if (y <= (-5d-49)) then
tmp = z * x
else if (y <= 5.5d-129) 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.6e+89) {
tmp = y * t;
} else if (y <= -5e-49) {
tmp = z * x;
} else if (y <= 5.5e-129) {
tmp = x;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.6e+89: tmp = y * t elif y <= -5e-49: tmp = z * x elif y <= 5.5e-129: tmp = x else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.6e+89) tmp = Float64(y * t); elseif (y <= -5e-49) tmp = Float64(z * x); elseif (y <= 5.5e-129) 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.6e+89) tmp = y * t; elseif (y <= -5e-49) tmp = z * x; elseif (y <= 5.5e-129) tmp = x; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.6e+89], N[(y * t), $MachinePrecision], If[LessEqual[y, -5e-49], N[(z * x), $MachinePrecision], If[LessEqual[y, 5.5e-129], x, N[(y * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+89}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-49}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -2.6000000000000001e89 or 5.50000000000000023e-129 < y Initial program 100.0%
Taylor expanded in t around inf 58.4%
Taylor expanded in y around inf 40.0%
*-commutative40.0%
Simplified40.0%
if -2.6000000000000001e89 < y < -4.9999999999999999e-49Initial program 100.0%
Taylor expanded in x around inf 72.3%
mul-1-neg72.3%
unsub-neg72.3%
Simplified72.3%
Taylor expanded in z around inf 34.5%
if -4.9999999999999999e-49 < y < 5.50000000000000023e-129Initial program 100.0%
Taylor expanded in t around inf 76.6%
Taylor expanded in x around inf 38.6%
Final simplification38.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -8.5e+19) (not (<= x 5.2e-126))) (* x (+ (- z y) 1.0)) (* (- y z) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.5e+19) || !(x <= 5.2e-126)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = (y - z) * 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 ((x <= (-8.5d+19)) .or. (.not. (x <= 5.2d-126))) then
tmp = x * ((z - y) + 1.0d0)
else
tmp = (y - z) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.5e+19) || !(x <= 5.2e-126)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = (y - z) * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -8.5e+19) or not (x <= 5.2e-126): tmp = x * ((z - y) + 1.0) else: tmp = (y - z) * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -8.5e+19) || !(x <= 5.2e-126)) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); else tmp = Float64(Float64(y - z) * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -8.5e+19) || ~((x <= 5.2e-126))) tmp = x * ((z - y) + 1.0); else tmp = (y - z) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.5e+19], N[Not[LessEqual[x, 5.2e-126]], $MachinePrecision]], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+19} \lor \neg \left(x \leq 5.2 \cdot 10^{-126}\right):\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\end{array}
\end{array}
if x < -8.5e19 or 5.19999999999999998e-126 < x Initial program 100.0%
Taylor expanded in x around inf 79.6%
mul-1-neg79.6%
unsub-neg79.6%
Simplified79.6%
if -8.5e19 < x < 5.19999999999999998e-126Initial program 100.0%
Taylor expanded in t around inf 89.1%
Taylor expanded in x around 0 80.6%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -8.6e+24) (not (<= x 8.2e+58))) (* x (+ (- z y) 1.0)) (- x (* t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.6e+24) || !(x <= 8.2e+58)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x - (t * (z - 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 ((x <= (-8.6d+24)) .or. (.not. (x <= 8.2d+58))) then
tmp = x * ((z - y) + 1.0d0)
else
tmp = x - (t * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.6e+24) || !(x <= 8.2e+58)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x - (t * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -8.6e+24) or not (x <= 8.2e+58): tmp = x * ((z - y) + 1.0) else: tmp = x - (t * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -8.6e+24) || !(x <= 8.2e+58)) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); else tmp = Float64(x - Float64(t * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -8.6e+24) || ~((x <= 8.2e+58))) tmp = x * ((z - y) + 1.0); else tmp = x - (t * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.6e+24], N[Not[LessEqual[x, 8.2e+58]], $MachinePrecision]], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{+24} \lor \neg \left(x \leq 8.2 \cdot 10^{+58}\right):\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\end{array}
\end{array}
if x < -8.59999999999999975e24 or 8.2e58 < x Initial program 100.0%
Taylor expanded in x around inf 87.7%
mul-1-neg87.7%
unsub-neg87.7%
Simplified87.7%
if -8.59999999999999975e24 < x < 8.2e58Initial program 100.0%
Taylor expanded in t around inf 81.5%
Final simplification84.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -8.8e-116) (not (<= t 1.35e+22))) (* (- y z) t) (* x (+ z 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -8.8e-116) || !(t <= 1.35e+22)) {
tmp = (y - z) * t;
} else {
tmp = x * (z + 1.0);
}
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 <= (-8.8d-116)) .or. (.not. (t <= 1.35d+22))) then
tmp = (y - z) * t
else
tmp = x * (z + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -8.8e-116) || !(t <= 1.35e+22)) {
tmp = (y - z) * t;
} else {
tmp = x * (z + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -8.8e-116) or not (t <= 1.35e+22): tmp = (y - z) * t else: tmp = x * (z + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -8.8e-116) || !(t <= 1.35e+22)) tmp = Float64(Float64(y - z) * t); else tmp = Float64(x * Float64(z + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -8.8e-116) || ~((t <= 1.35e+22))) tmp = (y - z) * t; else tmp = x * (z + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -8.8e-116], N[Not[LessEqual[t, 1.35e+22]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{-116} \lor \neg \left(t \leq 1.35 \cdot 10^{+22}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\end{array}
\end{array}
if t < -8.8000000000000004e-116 or 1.3500000000000001e22 < t Initial program 100.0%
Taylor expanded in t around inf 78.2%
Taylor expanded in x around 0 66.6%
if -8.8000000000000004e-116 < t < 1.3500000000000001e22Initial program 100.0%
Taylor expanded in x around inf 82.2%
mul-1-neg82.2%
unsub-neg82.2%
Simplified82.2%
Taylor expanded in y around 0 59.1%
+-commutative59.1%
Simplified59.1%
Final simplification63.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 0.215))) (* z x) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 0.215)) {
tmp = z * x;
} 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 ((z <= (-1.0d0)) .or. (.not. (z <= 0.215d0))) then
tmp = z * x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 0.215)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 0.215): tmp = z * x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 0.215)) tmp = Float64(z * x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~((z <= 0.215))) tmp = z * x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 0.215]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 0.215\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1 or 0.214999999999999997 < z Initial program 100.0%
Taylor expanded in x around inf 49.0%
mul-1-neg49.0%
unsub-neg49.0%
Simplified49.0%
Taylor expanded in z around inf 34.6%
if -1 < z < 0.214999999999999997Initial program 100.0%
Taylor expanded in t around inf 71.1%
Taylor expanded in x around inf 37.1%
Final simplification35.7%
(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}
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 64.1%
Taylor expanded in x around inf 18.4%
Final simplification18.4%
(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 2024075
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:alt
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))