
(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 13 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 (* x (- y))) (t_2 (+ x (* y t))))
(if (<= y -6.8e+135)
t_1
(if (<= y -6.2e+94)
t_2
(if (<= y -2.5e+56)
t_1
(if (<= y 1.4e+31)
(- x (* z t))
(if (or (<= y 8.5e+92) (not (<= y 5e+160))) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * -y;
double t_2 = x + (y * t);
double tmp;
if (y <= -6.8e+135) {
tmp = t_1;
} else if (y <= -6.2e+94) {
tmp = t_2;
} else if (y <= -2.5e+56) {
tmp = t_1;
} else if (y <= 1.4e+31) {
tmp = x - (z * t);
} else if ((y <= 8.5e+92) || !(y <= 5e+160)) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = x * -y
t_2 = x + (y * t)
if (y <= (-6.8d+135)) then
tmp = t_1
else if (y <= (-6.2d+94)) then
tmp = t_2
else if (y <= (-2.5d+56)) then
tmp = t_1
else if (y <= 1.4d+31) then
tmp = x - (z * t)
else if ((y <= 8.5d+92) .or. (.not. (y <= 5d+160))) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * -y;
double t_2 = x + (y * t);
double tmp;
if (y <= -6.8e+135) {
tmp = t_1;
} else if (y <= -6.2e+94) {
tmp = t_2;
} else if (y <= -2.5e+56) {
tmp = t_1;
} else if (y <= 1.4e+31) {
tmp = x - (z * t);
} else if ((y <= 8.5e+92) || !(y <= 5e+160)) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * -y t_2 = x + (y * t) tmp = 0 if y <= -6.8e+135: tmp = t_1 elif y <= -6.2e+94: tmp = t_2 elif y <= -2.5e+56: tmp = t_1 elif y <= 1.4e+31: tmp = x - (z * t) elif (y <= 8.5e+92) or not (y <= 5e+160): tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(-y)) t_2 = Float64(x + Float64(y * t)) tmp = 0.0 if (y <= -6.8e+135) tmp = t_1; elseif (y <= -6.2e+94) tmp = t_2; elseif (y <= -2.5e+56) tmp = t_1; elseif (y <= 1.4e+31) tmp = Float64(x - Float64(z * t)); elseif ((y <= 8.5e+92) || !(y <= 5e+160)) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * -y; t_2 = x + (y * t); tmp = 0.0; if (y <= -6.8e+135) tmp = t_1; elseif (y <= -6.2e+94) tmp = t_2; elseif (y <= -2.5e+56) tmp = t_1; elseif (y <= 1.4e+31) tmp = x - (z * t); elseif ((y <= 8.5e+92) || ~((y <= 5e+160))) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * (-y)), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e+135], t$95$1, If[LessEqual[y, -6.2e+94], t$95$2, If[LessEqual[y, -2.5e+56], t$95$1, If[LessEqual[y, 1.4e+31], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 8.5e+92], N[Not[LessEqual[y, 5e+160]], $MachinePrecision]], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(-y\right)\\
t_2 := x + y \cdot t\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+94}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+31}:\\
\;\;\;\;x - z \cdot t\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+92} \lor \neg \left(y \leq 5 \cdot 10^{+160}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -6.80000000000000019e135 or -6.19999999999999983e94 < y < -2.50000000000000012e56 or 1.40000000000000008e31 < y < 8.5000000000000001e92 or 5.0000000000000002e160 < y Initial program 99.9%
Taylor expanded in x around inf 65.2%
mul-1-neg65.2%
unsub-neg65.2%
Simplified65.2%
Taylor expanded in y around inf 58.8%
mul-1-neg58.8%
distribute-lft-neg-out58.8%
*-commutative58.8%
Simplified58.8%
if -6.80000000000000019e135 < y < -6.19999999999999983e94 or 8.5000000000000001e92 < y < 5.0000000000000002e160Initial program 100.0%
Taylor expanded in t around inf 59.1%
Taylor expanded in y around inf 56.1%
if -2.50000000000000012e56 < y < 1.40000000000000008e31Initial program 100.0%
Taylor expanded in t around inf 76.6%
Taylor expanded in y around 0 65.9%
mul-1-neg65.9%
unsub-neg65.9%
*-commutative65.9%
Simplified65.9%
Final simplification62.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y t))) (t_2 (- x (* z t))) (t_3 (* x (+ (- z y) 1.0))))
(if (<= x -1.22e-98)
t_3
(if (<= x 3.25e-305)
t_1
(if (<= x 6.2e-153)
t_2
(if (<= x 6e-126) t_1 (if (<= x 1.05e-76) t_2 t_3)))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * t);
double t_2 = x - (z * t);
double t_3 = x * ((z - y) + 1.0);
double tmp;
if (x <= -1.22e-98) {
tmp = t_3;
} else if (x <= 3.25e-305) {
tmp = t_1;
} else if (x <= 6.2e-153) {
tmp = t_2;
} else if (x <= 6e-126) {
tmp = t_1;
} else if (x <= 1.05e-76) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = x + (y * t)
t_2 = x - (z * t)
t_3 = x * ((z - y) + 1.0d0)
if (x <= (-1.22d-98)) then
tmp = t_3
else if (x <= 3.25d-305) then
tmp = t_1
else if (x <= 6.2d-153) then
tmp = t_2
else if (x <= 6d-126) then
tmp = t_1
else if (x <= 1.05d-76) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y * t);
double t_2 = x - (z * t);
double t_3 = x * ((z - y) + 1.0);
double tmp;
if (x <= -1.22e-98) {
tmp = t_3;
} else if (x <= 3.25e-305) {
tmp = t_1;
} else if (x <= 6.2e-153) {
tmp = t_2;
} else if (x <= 6e-126) {
tmp = t_1;
} else if (x <= 1.05e-76) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * t) t_2 = x - (z * t) t_3 = x * ((z - y) + 1.0) tmp = 0 if x <= -1.22e-98: tmp = t_3 elif x <= 3.25e-305: tmp = t_1 elif x <= 6.2e-153: tmp = t_2 elif x <= 6e-126: tmp = t_1 elif x <= 1.05e-76: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * t)) t_2 = Float64(x - Float64(z * t)) t_3 = Float64(x * Float64(Float64(z - y) + 1.0)) tmp = 0.0 if (x <= -1.22e-98) tmp = t_3; elseif (x <= 3.25e-305) tmp = t_1; elseif (x <= 6.2e-153) tmp = t_2; elseif (x <= 6e-126) tmp = t_1; elseif (x <= 1.05e-76) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * t); t_2 = x - (z * t); t_3 = x * ((z - y) + 1.0); tmp = 0.0; if (x <= -1.22e-98) tmp = t_3; elseif (x <= 3.25e-305) tmp = t_1; elseif (x <= 6.2e-153) tmp = t_2; elseif (x <= 6e-126) tmp = t_1; elseif (x <= 1.05e-76) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.22e-98], t$95$3, If[LessEqual[x, 3.25e-305], t$95$1, If[LessEqual[x, 6.2e-153], t$95$2, If[LessEqual[x, 6e-126], t$95$1, If[LessEqual[x, 1.05e-76], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot t\\
t_2 := x - z \cdot t\\
t_3 := x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{-98}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 3.25 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-76}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -1.2200000000000001e-98 or 1.04999999999999996e-76 < x Initial program 100.0%
Taylor expanded in x around inf 75.4%
mul-1-neg75.4%
unsub-neg75.4%
Simplified75.4%
if -1.2200000000000001e-98 < x < 3.24999999999999996e-305 or 6.1999999999999999e-153 < x < 6.0000000000000003e-126Initial program 100.0%
Taylor expanded in t around inf 88.3%
Taylor expanded in y around inf 65.7%
if 3.24999999999999996e-305 < x < 6.1999999999999999e-153 or 6.0000000000000003e-126 < x < 1.04999999999999996e-76Initial program 100.0%
Taylor expanded in t around inf 90.7%
Taylor expanded in y around 0 67.6%
mul-1-neg67.6%
unsub-neg67.6%
*-commutative67.6%
Simplified67.6%
Final simplification72.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ z 1.0))) (t_2 (* x (- y))) (t_3 (* z (- t))))
(if (<= y -1.6e+56)
t_2
(if (<= y -6.5e-43)
t_3
(if (<= y 4e-229)
t_1
(if (<= y 2.3e-131) t_3 (if (<= y 1.55e+31) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = x * -y;
double t_3 = z * -t;
double tmp;
if (y <= -1.6e+56) {
tmp = t_2;
} else if (y <= -6.5e-43) {
tmp = t_3;
} else if (y <= 4e-229) {
tmp = t_1;
} else if (y <= 2.3e-131) {
tmp = t_3;
} else if (y <= 1.55e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: tmp
t_1 = x * (z + 1.0d0)
t_2 = x * -y
t_3 = z * -t
if (y <= (-1.6d+56)) then
tmp = t_2
else if (y <= (-6.5d-43)) then
tmp = t_3
else if (y <= 4d-229) then
tmp = t_1
else if (y <= 2.3d-131) then
tmp = t_3
else if (y <= 1.55d+31) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = x * -y;
double t_3 = z * -t;
double tmp;
if (y <= -1.6e+56) {
tmp = t_2;
} else if (y <= -6.5e-43) {
tmp = t_3;
} else if (y <= 4e-229) {
tmp = t_1;
} else if (y <= 2.3e-131) {
tmp = t_3;
} else if (y <= 1.55e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z + 1.0) t_2 = x * -y t_3 = z * -t tmp = 0 if y <= -1.6e+56: tmp = t_2 elif y <= -6.5e-43: tmp = t_3 elif y <= 4e-229: tmp = t_1 elif y <= 2.3e-131: tmp = t_3 elif y <= 1.55e+31: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z + 1.0)) t_2 = Float64(x * Float64(-y)) t_3 = Float64(z * Float64(-t)) tmp = 0.0 if (y <= -1.6e+56) tmp = t_2; elseif (y <= -6.5e-43) tmp = t_3; elseif (y <= 4e-229) tmp = t_1; elseif (y <= 2.3e-131) tmp = t_3; elseif (y <= 1.55e+31) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z + 1.0); t_2 = x * -y; t_3 = z * -t; tmp = 0.0; if (y <= -1.6e+56) tmp = t_2; elseif (y <= -6.5e-43) tmp = t_3; elseif (y <= 4e-229) tmp = t_1; elseif (y <= 2.3e-131) tmp = t_3; elseif (y <= 1.55e+31) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * (-y)), $MachinePrecision]}, Block[{t$95$3 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[y, -1.6e+56], t$95$2, If[LessEqual[y, -6.5e-43], t$95$3, If[LessEqual[y, 4e-229], t$95$1, If[LessEqual[y, 2.3e-131], t$95$3, If[LessEqual[y, 1.55e+31], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(z + 1\right)\\
t_2 := x \cdot \left(-y\right)\\
t_3 := z \cdot \left(-t\right)\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-43}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-229}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-131}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.60000000000000002e56 or 1.5500000000000001e31 < y Initial program 100.0%
Taylor expanded in x around inf 58.7%
mul-1-neg58.7%
unsub-neg58.7%
Simplified58.7%
Taylor expanded in y around inf 49.4%
mul-1-neg49.4%
distribute-lft-neg-out49.4%
*-commutative49.4%
Simplified49.4%
if -1.60000000000000002e56 < y < -6.50000000000000001e-43 or 4.00000000000000028e-229 < y < 2.30000000000000022e-131Initial program 100.0%
Taylor expanded in t around inf 83.3%
Taylor expanded in y around 0 71.9%
mul-1-neg71.9%
unsub-neg71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in x around 0 59.2%
mul-1-neg59.2%
distribute-rgt-neg-out59.2%
Simplified59.2%
if -6.50000000000000001e-43 < y < 4.00000000000000028e-229 or 2.30000000000000022e-131 < y < 1.5500000000000001e31Initial program 100.0%
Taylor expanded in x around inf 62.5%
mul-1-neg62.5%
unsub-neg62.5%
Simplified62.5%
Taylor expanded in y around 0 60.7%
+-commutative60.7%
Simplified60.7%
Final simplification55.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))) (t_2 (* x (- 1.0 y))))
(if (<= t -6.5e+34)
t_1
(if (<= t 3.5e-70)
t_2
(if (<= t 2.05e-10) (* x (+ z 1.0)) (if (<= t 9.5e+78) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = x * (1.0 - y);
double tmp;
if (t <= -6.5e+34) {
tmp = t_1;
} else if (t <= 3.5e-70) {
tmp = t_2;
} else if (t <= 2.05e-10) {
tmp = x * (z + 1.0);
} else if (t <= 9.5e+78) {
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 * -t
t_2 = x * (1.0d0 - y)
if (t <= (-6.5d+34)) then
tmp = t_1
else if (t <= 3.5d-70) then
tmp = t_2
else if (t <= 2.05d-10) then
tmp = x * (z + 1.0d0)
else if (t <= 9.5d+78) 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 * -t;
double t_2 = x * (1.0 - y);
double tmp;
if (t <= -6.5e+34) {
tmp = t_1;
} else if (t <= 3.5e-70) {
tmp = t_2;
} else if (t <= 2.05e-10) {
tmp = x * (z + 1.0);
} else if (t <= 9.5e+78) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t t_2 = x * (1.0 - y) tmp = 0 if t <= -6.5e+34: tmp = t_1 elif t <= 3.5e-70: tmp = t_2 elif t <= 2.05e-10: tmp = x * (z + 1.0) elif t <= 9.5e+78: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) t_2 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (t <= -6.5e+34) tmp = t_1; elseif (t <= 3.5e-70) tmp = t_2; elseif (t <= 2.05e-10) tmp = Float64(x * Float64(z + 1.0)); elseif (t <= 9.5e+78) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; t_2 = x * (1.0 - y); tmp = 0.0; if (t <= -6.5e+34) tmp = t_1; elseif (t <= 3.5e-70) tmp = t_2; elseif (t <= 2.05e-10) tmp = x * (z + 1.0); elseif (t <= 9.5e+78) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+34], t$95$1, If[LessEqual[t, 3.5e-70], t$95$2, If[LessEqual[t, 2.05e-10], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+78], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
t_2 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+78}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.50000000000000017e34 or 9.5000000000000006e78 < t Initial program 100.0%
Taylor expanded in t around inf 92.7%
Taylor expanded in y around 0 54.4%
mul-1-neg54.4%
unsub-neg54.4%
*-commutative54.4%
Simplified54.4%
Taylor expanded in x around 0 49.3%
mul-1-neg49.3%
distribute-rgt-neg-out49.3%
Simplified49.3%
if -6.50000000000000017e34 < t < 3.49999999999999974e-70 or 2.0499999999999999e-10 < t < 9.5000000000000006e78Initial program 100.0%
Taylor expanded in x around inf 74.0%
mul-1-neg74.0%
unsub-neg74.0%
Simplified74.0%
Taylor expanded in z around 0 56.1%
if 3.49999999999999974e-70 < t < 2.0499999999999999e-10Initial program 99.9%
Taylor expanded in x around inf 77.4%
mul-1-neg77.4%
unsub-neg77.4%
Simplified77.4%
Taylor expanded in y around 0 61.0%
+-commutative61.0%
Simplified61.0%
Final simplification54.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y t))))
(if (<= t -6.2e-88)
t_1
(if (<= t 3.5e-67)
(* x (- 1.0 y))
(if (<= t 5.9e+38)
(* x (+ z 1.0))
(if (<= t 2.3e+91) (* z (- t)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * t);
double tmp;
if (t <= -6.2e-88) {
tmp = t_1;
} else if (t <= 3.5e-67) {
tmp = x * (1.0 - y);
} else if (t <= 5.9e+38) {
tmp = x * (z + 1.0);
} else if (t <= 2.3e+91) {
tmp = 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 + (y * t)
if (t <= (-6.2d-88)) then
tmp = t_1
else if (t <= 3.5d-67) then
tmp = x * (1.0d0 - y)
else if (t <= 5.9d+38) then
tmp = x * (z + 1.0d0)
else if (t <= 2.3d+91) then
tmp = 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 + (y * t);
double tmp;
if (t <= -6.2e-88) {
tmp = t_1;
} else if (t <= 3.5e-67) {
tmp = x * (1.0 - y);
} else if (t <= 5.9e+38) {
tmp = x * (z + 1.0);
} else if (t <= 2.3e+91) {
tmp = z * -t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * t) tmp = 0 if t <= -6.2e-88: tmp = t_1 elif t <= 3.5e-67: tmp = x * (1.0 - y) elif t <= 5.9e+38: tmp = x * (z + 1.0) elif t <= 2.3e+91: tmp = z * -t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * t)) tmp = 0.0 if (t <= -6.2e-88) tmp = t_1; elseif (t <= 3.5e-67) tmp = Float64(x * Float64(1.0 - y)); elseif (t <= 5.9e+38) tmp = Float64(x * Float64(z + 1.0)); elseif (t <= 2.3e+91) tmp = Float64(z * Float64(-t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * t); tmp = 0.0; if (t <= -6.2e-88) tmp = t_1; elseif (t <= 3.5e-67) tmp = x * (1.0 - y); elseif (t <= 5.9e+38) tmp = x * (z + 1.0); elseif (t <= 2.3e+91) tmp = z * -t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-88], t$95$1, If[LessEqual[t, 3.5e-67], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.9e+38], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+91], N[(z * (-t)), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot t\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-67}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{+38}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+91}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.1999999999999995e-88 or 2.29999999999999991e91 < t Initial program 100.0%
Taylor expanded in t around inf 88.9%
Taylor expanded in y around inf 49.1%
if -6.1999999999999995e-88 < t < 3.5e-67Initial program 100.0%
Taylor expanded in x around inf 82.6%
mul-1-neg82.6%
unsub-neg82.6%
Simplified82.6%
Taylor expanded in z around 0 62.4%
if 3.5e-67 < t < 5.89999999999999981e38Initial program 99.9%
Taylor expanded in x around inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
Simplified76.4%
Taylor expanded in y around 0 57.2%
+-commutative57.2%
Simplified57.2%
if 5.89999999999999981e38 < t < 2.29999999999999991e91Initial program 100.0%
Taylor expanded in t around inf 67.9%
Taylor expanded in y around 0 67.9%
mul-1-neg67.9%
unsub-neg67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in x around 0 51.6%
mul-1-neg51.6%
distribute-rgt-neg-out51.6%
Simplified51.6%
Final simplification55.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- y))) (t_2 (* z (- t))))
(if (<= y -1.45e+57)
t_1
(if (<= y -4.2e-89)
t_2
(if (<= y -1.26e-238) x (if (<= y 1.55e+31) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * -y;
double t_2 = z * -t;
double tmp;
if (y <= -1.45e+57) {
tmp = t_1;
} else if (y <= -4.2e-89) {
tmp = t_2;
} else if (y <= -1.26e-238) {
tmp = x;
} else if (y <= 1.55e+31) {
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 = x * -y
t_2 = z * -t
if (y <= (-1.45d+57)) then
tmp = t_1
else if (y <= (-4.2d-89)) then
tmp = t_2
else if (y <= (-1.26d-238)) then
tmp = x
else if (y <= 1.55d+31) 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 = x * -y;
double t_2 = z * -t;
double tmp;
if (y <= -1.45e+57) {
tmp = t_1;
} else if (y <= -4.2e-89) {
tmp = t_2;
} else if (y <= -1.26e-238) {
tmp = x;
} else if (y <= 1.55e+31) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * -y t_2 = z * -t tmp = 0 if y <= -1.45e+57: tmp = t_1 elif y <= -4.2e-89: tmp = t_2 elif y <= -1.26e-238: tmp = x elif y <= 1.55e+31: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(-y)) t_2 = Float64(z * Float64(-t)) tmp = 0.0 if (y <= -1.45e+57) tmp = t_1; elseif (y <= -4.2e-89) tmp = t_2; elseif (y <= -1.26e-238) tmp = x; elseif (y <= 1.55e+31) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * -y; t_2 = z * -t; tmp = 0.0; if (y <= -1.45e+57) tmp = t_1; elseif (y <= -4.2e-89) tmp = t_2; elseif (y <= -1.26e-238) tmp = x; elseif (y <= 1.55e+31) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * (-y)), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[y, -1.45e+57], t$95$1, If[LessEqual[y, -4.2e-89], t$95$2, If[LessEqual[y, -1.26e-238], x, If[LessEqual[y, 1.55e+31], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(-y\right)\\
t_2 := z \cdot \left(-t\right)\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.26 \cdot 10^{-238}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.4500000000000001e57 or 1.5500000000000001e31 < y Initial program 100.0%
Taylor expanded in x around inf 58.7%
mul-1-neg58.7%
unsub-neg58.7%
Simplified58.7%
Taylor expanded in y around inf 49.4%
mul-1-neg49.4%
distribute-lft-neg-out49.4%
*-commutative49.4%
Simplified49.4%
if -1.4500000000000001e57 < y < -4.2000000000000002e-89 or -1.26000000000000004e-238 < y < 1.5500000000000001e31Initial program 100.0%
Taylor expanded in t around inf 76.0%
Taylor expanded in y around 0 65.7%
mul-1-neg65.7%
unsub-neg65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in x around 0 45.3%
mul-1-neg45.3%
distribute-rgt-neg-out45.3%
Simplified45.3%
if -4.2000000000000002e-89 < y < -1.26000000000000004e-238Initial program 99.9%
Taylor expanded in t around inf 79.5%
Taylor expanded in x around inf 44.8%
Final simplification47.2%
(FPCore (x y z t) :precision binary64 (if (<= x -4.3e+92) (* z x) (if (<= x 1.16e+42) (* z (- t)) (if (<= x 1.5e+103) x (* z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.3e+92) {
tmp = z * x;
} else if (x <= 1.16e+42) {
tmp = z * -t;
} else if (x <= 1.5e+103) {
tmp = x;
} 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 (x <= (-4.3d+92)) then
tmp = z * x
else if (x <= 1.16d+42) then
tmp = z * -t
else if (x <= 1.5d+103) then
tmp = x
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 (x <= -4.3e+92) {
tmp = z * x;
} else if (x <= 1.16e+42) {
tmp = z * -t;
} else if (x <= 1.5e+103) {
tmp = x;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.3e+92: tmp = z * x elif x <= 1.16e+42: tmp = z * -t elif x <= 1.5e+103: tmp = x else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.3e+92) tmp = Float64(z * x); elseif (x <= 1.16e+42) tmp = Float64(z * Float64(-t)); elseif (x <= 1.5e+103) tmp = x; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4.3e+92) tmp = z * x; elseif (x <= 1.16e+42) tmp = z * -t; elseif (x <= 1.5e+103) tmp = x; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.3e+92], N[(z * x), $MachinePrecision], If[LessEqual[x, 1.16e+42], N[(z * (-t)), $MachinePrecision], If[LessEqual[x, 1.5e+103], x, N[(z * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+92}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{+42}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if x < -4.2999999999999998e92 or 1.5e103 < 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 inf 40.0%
*-commutative40.0%
Simplified40.0%
if -4.2999999999999998e92 < x < 1.15999999999999995e42Initial program 100.0%
Taylor expanded in t around inf 76.0%
Taylor expanded in y around 0 45.2%
mul-1-neg45.2%
unsub-neg45.2%
*-commutative45.2%
Simplified45.2%
Taylor expanded in x around 0 34.8%
mul-1-neg34.8%
distribute-rgt-neg-out34.8%
Simplified34.8%
if 1.15999999999999995e42 < x < 1.5e103Initial program 99.8%
Taylor expanded in t around inf 72.6%
Taylor expanded in x around inf 43.6%
Final simplification37.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.15e-87) (not (<= t 1.3e+40))) (- x (* t (- z y))) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.15e-87) || !(t <= 1.3e+40)) {
tmp = x - (t * (z - y));
} else {
tmp = x * ((z - y) + 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 <= (-1.15d-87)) .or. (.not. (t <= 1.3d+40))) then
tmp = x - (t * (z - y))
else
tmp = x * ((z - y) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.15e-87) || !(t <= 1.3e+40)) {
tmp = x - (t * (z - y));
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.15e-87) or not (t <= 1.3e+40): tmp = x - (t * (z - y)) else: tmp = x * ((z - y) + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.15e-87) || !(t <= 1.3e+40)) tmp = Float64(x - Float64(t * Float64(z - y))); else tmp = Float64(x * Float64(Float64(z - y) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.15e-87) || ~((t <= 1.3e+40))) tmp = x - (t * (z - y)); else tmp = x * ((z - y) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.15e-87], N[Not[LessEqual[t, 1.3e+40]], $MachinePrecision]], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-87} \lor \neg \left(t \leq 1.3 \cdot 10^{+40}\right):\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\end{array}
\end{array}
if t < -1.1500000000000001e-87 or 1.3e40 < t Initial program 100.0%
Taylor expanded in t around inf 88.6%
if -1.1500000000000001e-87 < t < 1.3e40Initial program 100.0%
Taylor expanded in x around inf 81.4%
mul-1-neg81.4%
unsub-neg81.4%
Simplified81.4%
Final simplification84.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6800000000.0) (not (<= y 1.05e+20))) (- x (* y (- x t))) (+ x (* z (- x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6800000000.0) || !(y <= 1.05e+20)) {
tmp = x - (y * (x - t));
} else {
tmp = x + (z * (x - 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 <= (-6800000000.0d0)) .or. (.not. (y <= 1.05d+20))) then
tmp = x - (y * (x - t))
else
tmp = x + (z * (x - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6800000000.0) || !(y <= 1.05e+20)) {
tmp = x - (y * (x - t));
} else {
tmp = x + (z * (x - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6800000000.0) or not (y <= 1.05e+20): tmp = x - (y * (x - t)) else: tmp = x + (z * (x - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6800000000.0) || !(y <= 1.05e+20)) tmp = Float64(x - Float64(y * Float64(x - t))); else tmp = Float64(x + Float64(z * Float64(x - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6800000000.0) || ~((y <= 1.05e+20))) tmp = x - (y * (x - t)); else tmp = x + (z * (x - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6800000000.0], N[Not[LessEqual[y, 1.05e+20]], $MachinePrecision]], N[(x - N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6800000000 \lor \neg \left(y \leq 1.05 \cdot 10^{+20}\right):\\
\;\;\;\;x - y \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\end{array}
\end{array}
if y < -6.8e9 or 1.05e20 < y Initial program 100.0%
Taylor expanded in y around inf 83.0%
*-commutative83.0%
Simplified83.0%
if -6.8e9 < y < 1.05e20Initial program 100.0%
Taylor expanded in y around 0 91.2%
mul-1-neg91.2%
unsub-neg91.2%
Simplified91.2%
Final simplification86.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6e+28) (not (<= z 2.2e-6))) (* z x) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+28) || !(z <= 2.2e-6)) {
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 <= (-6d+28)) .or. (.not. (z <= 2.2d-6))) 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 <= -6e+28) || !(z <= 2.2e-6)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6e+28) or not (z <= 2.2e-6): tmp = z * x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6e+28) || !(z <= 2.2e-6)) tmp = Float64(z * x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6e+28) || ~((z <= 2.2e-6))) tmp = z * x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6e+28], N[Not[LessEqual[z, 2.2e-6]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+28} \lor \neg \left(z \leq 2.2 \cdot 10^{-6}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.0000000000000002e28 or 2.2000000000000001e-6 < z Initial program 99.9%
Taylor expanded in x around inf 53.2%
mul-1-neg53.2%
unsub-neg53.2%
Simplified53.2%
Taylor expanded in z around inf 40.7%
*-commutative40.7%
Simplified40.7%
if -6.0000000000000002e28 < z < 2.2000000000000001e-6Initial program 100.0%
Taylor expanded in t around inf 66.5%
Taylor expanded in x around inf 25.3%
Final simplification32.2%
(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 62.0%
Taylor expanded in x around inf 15.1%
Final simplification15.1%
(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 2024076
(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))))