
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
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 - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
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 - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= y 3.1e-46) (+ x (/ (- z x) (/ t y))) (fma y (/ (- z x) t) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 3.1e-46) {
tmp = x + ((z - x) / (t / y));
} else {
tmp = fma(y, ((z - x) / t), x);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 3.1e-46) tmp = Float64(x + Float64(Float64(z - x) / Float64(t / y))); else tmp = fma(y, Float64(Float64(z - x) / t), x); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 3.1e-46], N[(x + N[(N[(z - x), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.1 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{z - x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - x}{t}, x\right)\\
\end{array}
\end{array}
if y < 3.1000000000000001e-46Initial program 96.7%
Taylor expanded in z around 0 95.6%
mul-1-neg95.6%
associate-/l*94.4%
distribute-lft-neg-in94.4%
*-commutative94.4%
associate-*r/93.0%
distribute-rgt-in97.1%
+-commutative97.1%
sub-neg97.1%
Simplified97.1%
Taylor expanded in y around 0 96.7%
associate-*r/86.3%
*-commutative86.3%
associate-/r/97.2%
Simplified97.2%
if 3.1000000000000001e-46 < y Initial program 89.9%
+-commutative89.9%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5.8e-59) (not (<= x 1.35e-89))) (* x (- 1.0 (/ y t))) (/ (* y z) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.8e-59) || !(x <= 1.35e-89)) {
tmp = x * (1.0 - (y / t));
} 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 <= (-5.8d-59)) .or. (.not. (x <= 1.35d-89))) then
tmp = x * (1.0d0 - (y / t))
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 <= -5.8e-59) || !(x <= 1.35e-89)) {
tmp = x * (1.0 - (y / t));
} else {
tmp = (y * z) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5.8e-59) or not (x <= 1.35e-89): tmp = x * (1.0 - (y / t)) else: tmp = (y * z) / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5.8e-59) || !(x <= 1.35e-89)) tmp = Float64(x * Float64(1.0 - Float64(y / t))); else tmp = Float64(Float64(y * z) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -5.8e-59) || ~((x <= 1.35e-89))) tmp = x * (1.0 - (y / t)); else tmp = (y * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5.8e-59], N[Not[LessEqual[x, 1.35e-89]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-59} \lor \neg \left(x \leq 1.35 \cdot 10^{-89}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\end{array}
if x < -5.80000000000000033e-59 or 1.34999999999999994e-89 < x Initial program 93.0%
Taylor expanded in x around inf 82.8%
mul-1-neg82.8%
unsub-neg82.8%
Simplified82.8%
if -5.80000000000000033e-59 < x < 1.34999999999999994e-89Initial program 96.5%
Taylor expanded in y around -inf 81.6%
Taylor expanded in z around inf 72.3%
Final simplification78.5%
(FPCore (x y z t) :precision binary64 (if (<= t -8.5e-104) (+ x (* z (/ y t))) (if (<= t 1.02e-100) (/ (* y (- z x)) t) (+ x (* y (/ z t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.5e-104) {
tmp = x + (z * (y / t));
} else if (t <= 1.02e-100) {
tmp = (y * (z - x)) / t;
} else {
tmp = x + (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 (t <= (-8.5d-104)) then
tmp = x + (z * (y / t))
else if (t <= 1.02d-100) then
tmp = (y * (z - x)) / t
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.5e-104) {
tmp = x + (z * (y / t));
} else if (t <= 1.02e-100) {
tmp = (y * (z - x)) / t;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -8.5e-104: tmp = x + (z * (y / t)) elif t <= 1.02e-100: tmp = (y * (z - x)) / t else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -8.5e-104) tmp = Float64(x + Float64(z * Float64(y / t))); elseif (t <= 1.02e-100) tmp = Float64(Float64(y * Float64(z - x)) / t); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -8.5e-104) tmp = x + (z * (y / t)); elseif (t <= 1.02e-100) tmp = (y * (z - x)) / t; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -8.5e-104], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e-100], N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{-104}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-100}:\\
\;\;\;\;\frac{y \cdot \left(z - x\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < -8.50000000000000007e-104Initial program 88.3%
Taylor expanded in z around 0 88.2%
mul-1-neg88.2%
associate-/l*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
associate-*r/98.5%
distribute-rgt-in99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 86.4%
if -8.50000000000000007e-104 < t < 1.02e-100Initial program 98.3%
Taylor expanded in y around -inf 91.0%
if 1.02e-100 < t Initial program 95.3%
Taylor expanded in z around inf 84.0%
associate-/l*86.2%
Simplified86.2%
Final simplification88.1%
(FPCore (x y z t) :precision binary64 (if (<= x -3.7e-43) (* x (/ (- t y) t)) (if (<= x 3.1e+113) (+ x (/ (* y z) t)) (* x (- 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.7e-43) {
tmp = x * ((t - y) / t);
} else if (x <= 3.1e+113) {
tmp = x + ((y * z) / t);
} else {
tmp = x * (1.0 - (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 (x <= (-3.7d-43)) then
tmp = x * ((t - y) / t)
else if (x <= 3.1d+113) then
tmp = x + ((y * z) / t)
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.7e-43) {
tmp = x * ((t - y) / t);
} else if (x <= 3.1e+113) {
tmp = x + ((y * z) / t);
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.7e-43: tmp = x * ((t - y) / t) elif x <= 3.1e+113: tmp = x + ((y * z) / t) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.7e-43) tmp = Float64(x * Float64(Float64(t - y) / t)); elseif (x <= 3.1e+113) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.7e-43) tmp = x * ((t - y) / t); elseif (x <= 3.1e+113) tmp = x + ((y * z) / t); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.7e-43], N[(x * N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e+113], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+113}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if x < -3.7e-43Initial program 93.6%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
unsub-neg87.3%
Simplified87.3%
Taylor expanded in t around 0 87.3%
if -3.7e-43 < x < 3.09999999999999991e113Initial program 95.4%
Taylor expanded in z around inf 85.0%
if 3.09999999999999991e113 < x Initial program 92.8%
Taylor expanded in x around inf 90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
(FPCore (x y z t) :precision binary64 (if (<= x -4.4e-43) (* x (/ (- t y) t)) (if (<= x 9.5e+113) (+ x (/ z (/ t y))) (* x (- 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.4e-43) {
tmp = x * ((t - y) / t);
} else if (x <= 9.5e+113) {
tmp = x + (z / (t / y));
} else {
tmp = x * (1.0 - (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 (x <= (-4.4d-43)) then
tmp = x * ((t - y) / t)
else if (x <= 9.5d+113) then
tmp = x + (z / (t / y))
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.4e-43) {
tmp = x * ((t - y) / t);
} else if (x <= 9.5e+113) {
tmp = x + (z / (t / y));
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.4e-43: tmp = x * ((t - y) / t) elif x <= 9.5e+113: tmp = x + (z / (t / y)) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.4e-43) tmp = Float64(x * Float64(Float64(t - y) / t)); elseif (x <= 9.5e+113) tmp = Float64(x + Float64(z / Float64(t / y))); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4.4e-43) tmp = x * ((t - y) / t); elseif (x <= 9.5e+113) tmp = x + (z / (t / y)); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.4e-43], N[(x * N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+113], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+113}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if x < -4.39999999999999994e-43Initial program 93.6%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
unsub-neg87.3%
Simplified87.3%
Taylor expanded in t around 0 87.3%
if -4.39999999999999994e-43 < x < 9.5000000000000001e113Initial program 95.4%
Taylor expanded in z around 0 93.9%
mul-1-neg93.9%
associate-/l*84.4%
distribute-lft-neg-in84.4%
*-commutative84.4%
associate-*r/87.3%
distribute-rgt-in91.9%
+-commutative91.9%
sub-neg91.9%
Simplified91.9%
Taylor expanded in y around 0 95.4%
associate-*r/93.5%
*-commutative93.5%
associate-/r/91.9%
Simplified91.9%
Taylor expanded in z around inf 83.9%
if 9.5000000000000001e113 < x Initial program 92.8%
Taylor expanded in x around inf 90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
(FPCore (x y z t) :precision binary64 (if (<= x -3.7e-43) (* x (/ (- t y) t)) (if (<= x 3e+113) (+ x (* z (/ y t))) (* x (- 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.7e-43) {
tmp = x * ((t - y) / t);
} else if (x <= 3e+113) {
tmp = x + (z * (y / t));
} else {
tmp = x * (1.0 - (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 (x <= (-3.7d-43)) then
tmp = x * ((t - y) / t)
else if (x <= 3d+113) then
tmp = x + (z * (y / t))
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.7e-43) {
tmp = x * ((t - y) / t);
} else if (x <= 3e+113) {
tmp = x + (z * (y / t));
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.7e-43: tmp = x * ((t - y) / t) elif x <= 3e+113: tmp = x + (z * (y / t)) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.7e-43) tmp = Float64(x * Float64(Float64(t - y) / t)); elseif (x <= 3e+113) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.7e-43) tmp = x * ((t - y) / t); elseif (x <= 3e+113) tmp = x + (z * (y / t)); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.7e-43], N[(x * N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e+113], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\
\mathbf{elif}\;x \leq 3 \cdot 10^{+113}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if x < -3.7e-43Initial program 93.6%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
unsub-neg87.3%
Simplified87.3%
Taylor expanded in t around 0 87.3%
if -3.7e-43 < x < 3e113Initial program 95.4%
Taylor expanded in z around 0 93.9%
mul-1-neg93.9%
associate-/l*84.4%
distribute-lft-neg-in84.4%
*-commutative84.4%
associate-*r/87.3%
distribute-rgt-in91.9%
+-commutative91.9%
sub-neg91.9%
Simplified91.9%
Taylor expanded in z around inf 83.9%
if 3e113 < x Initial program 92.8%
Taylor expanded in x around inf 90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Final simplification85.9%
(FPCore (x y z t) :precision binary64 (if (<= x -4.2e-43) (* x (/ (- t y) t)) (if (<= x 3.5e+113) (+ x (* y (/ z t))) (* x (- 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.2e-43) {
tmp = x * ((t - y) / t);
} else if (x <= 3.5e+113) {
tmp = x + (y * (z / t));
} else {
tmp = x * (1.0 - (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 (x <= (-4.2d-43)) then
tmp = x * ((t - y) / t)
else if (x <= 3.5d+113) then
tmp = x + (y * (z / t))
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.2e-43) {
tmp = x * ((t - y) / t);
} else if (x <= 3.5e+113) {
tmp = x + (y * (z / t));
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.2e-43: tmp = x * ((t - y) / t) elif x <= 3.5e+113: tmp = x + (y * (z / t)) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.2e-43) tmp = Float64(x * Float64(Float64(t - y) / t)); elseif (x <= 3.5e+113) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4.2e-43) tmp = x * ((t - y) / t); elseif (x <= 3.5e+113) tmp = x + (y * (z / t)); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.2e-43], N[(x * N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+113], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+113}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if x < -4.2000000000000001e-43Initial program 93.6%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
unsub-neg87.3%
Simplified87.3%
Taylor expanded in t around 0 87.3%
if -4.2000000000000001e-43 < x < 3.5000000000000001e113Initial program 95.4%
Taylor expanded in z around inf 85.0%
associate-/l*82.9%
Simplified82.9%
if 3.5000000000000001e113 < x Initial program 92.8%
Taylor expanded in x around inf 90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
(FPCore (x y z t) :precision binary64 (if (<= x -7.8e-39) (* x (/ (- t y) t)) (if (<= x 270.0) (* (- z x) (/ y t)) (* x (- 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.8e-39) {
tmp = x * ((t - y) / t);
} else if (x <= 270.0) {
tmp = (z - x) * (y / t);
} else {
tmp = x * (1.0 - (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 (x <= (-7.8d-39)) then
tmp = x * ((t - y) / t)
else if (x <= 270.0d0) then
tmp = (z - x) * (y / t)
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.8e-39) {
tmp = x * ((t - y) / t);
} else if (x <= 270.0) {
tmp = (z - x) * (y / t);
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7.8e-39: tmp = x * ((t - y) / t) elif x <= 270.0: tmp = (z - x) * (y / t) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7.8e-39) tmp = Float64(x * Float64(Float64(t - y) / t)); elseif (x <= 270.0) tmp = Float64(Float64(z - x) * Float64(y / t)); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -7.8e-39) tmp = x * ((t - y) / t); elseif (x <= 270.0) tmp = (z - x) * (y / t); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7.8e-39], N[(x * N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 270.0], N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\
\mathbf{elif}\;x \leq 270:\\
\;\;\;\;\left(z - x\right) \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if x < -7.80000000000000059e-39Initial program 93.3%
Taylor expanded in x around inf 88.1%
mul-1-neg88.1%
unsub-neg88.1%
Simplified88.1%
Taylor expanded in t around 0 88.1%
if -7.80000000000000059e-39 < x < 270Initial program 96.3%
Taylor expanded in y around -inf 78.4%
Taylor expanded in z around 0 78.4%
mul-1-neg96.3%
associate-/l*84.8%
distribute-lft-neg-in84.8%
*-commutative84.8%
associate-*r/87.3%
distribute-rgt-in90.9%
+-commutative90.9%
sub-neg90.9%
Simplified73.5%
if 270 < x Initial program 92.0%
Taylor expanded in x around inf 84.4%
mul-1-neg84.4%
unsub-neg84.4%
Simplified84.4%
Final simplification80.1%
(FPCore (x y z t) :precision binary64 (if (<= x -4.2e-59) (* x (/ (- t y) t)) (if (<= x 2.2e-88) (/ (* y z) t) (* x (- 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.2e-59) {
tmp = x * ((t - y) / t);
} else if (x <= 2.2e-88) {
tmp = (y * z) / t;
} else {
tmp = x * (1.0 - (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 (x <= (-4.2d-59)) then
tmp = x * ((t - y) / t)
else if (x <= 2.2d-88) then
tmp = (y * z) / t
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.2e-59) {
tmp = x * ((t - y) / t);
} else if (x <= 2.2e-88) {
tmp = (y * z) / t;
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.2e-59: tmp = x * ((t - y) / t) elif x <= 2.2e-88: tmp = (y * z) / t else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.2e-59) tmp = Float64(x * Float64(Float64(t - y) / t)); elseif (x <= 2.2e-88) tmp = Float64(Float64(y * z) / t); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4.2e-59) tmp = x * ((t - y) / t); elseif (x <= 2.2e-88) tmp = (y * z) / t; else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.2e-59], N[(x * N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e-88], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-59}:\\
\;\;\;\;x \cdot \frac{t - y}{t}\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-88}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if x < -4.19999999999999993e-59Initial program 93.8%
Taylor expanded in x around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
Simplified86.0%
Taylor expanded in t around 0 86.1%
if -4.19999999999999993e-59 < x < 2.20000000000000005e-88Initial program 96.5%
Taylor expanded in y around -inf 81.6%
Taylor expanded in z around inf 72.3%
if 2.20000000000000005e-88 < x Initial program 92.2%
Taylor expanded in x around inf 79.5%
mul-1-neg79.5%
unsub-neg79.5%
Simplified79.5%
(FPCore (x y z t) :precision binary64 (if (<= x -3.8e-42) x (if (<= x 190.0) (/ (* y z) t) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.8e-42) {
tmp = x;
} else if (x <= 190.0) {
tmp = (y * z) / 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 (x <= (-3.8d-42)) then
tmp = x
else if (x <= 190.0d0) then
tmp = (y * z) / 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 (x <= -3.8e-42) {
tmp = x;
} else if (x <= 190.0) {
tmp = (y * z) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.8e-42: tmp = x elif x <= 190.0: tmp = (y * z) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.8e-42) tmp = x; elseif (x <= 190.0) tmp = Float64(Float64(y * z) / t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.8e-42) tmp = x; elseif (x <= 190.0) tmp = (y * z) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.8e-42], x, If[LessEqual[x, 190.0], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{-42}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 190:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.80000000000000017e-42 or 190 < x Initial program 92.8%
Taylor expanded in y around 0 48.2%
if -3.80000000000000017e-42 < x < 190Initial program 96.2%
Taylor expanded in y around -inf 78.3%
Taylor expanded in z around inf 68.0%
(FPCore (x y z t) :precision binary64 (if (<= x -1.3e-41) x (if (<= x 940.0) (/ z (/ t y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.3e-41) {
tmp = x;
} else if (x <= 940.0) {
tmp = z / (t / y);
} 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 (x <= (-1.3d-41)) then
tmp = x
else if (x <= 940.0d0) then
tmp = z / (t / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.3e-41) {
tmp = x;
} else if (x <= 940.0) {
tmp = z / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.3e-41: tmp = x elif x <= 940.0: tmp = z / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.3e-41) tmp = x; elseif (x <= 940.0) tmp = Float64(z / Float64(t / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.3e-41) tmp = x; elseif (x <= 940.0) tmp = z / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.3e-41], x, If[LessEqual[x, 940.0], N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{-41}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 940:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.3e-41 or 940 < x Initial program 92.8%
Taylor expanded in y around 0 48.2%
if -1.3e-41 < x < 940Initial program 96.2%
Taylor expanded in y around -inf 78.3%
Taylor expanded in z around 0 78.3%
mul-1-neg96.2%
associate-/l*84.6%
distribute-lft-neg-in84.6%
*-commutative84.6%
associate-*r/87.2%
distribute-rgt-in90.8%
+-commutative90.8%
sub-neg90.8%
Simplified73.3%
Taylor expanded in z around inf 66.4%
*-commutative66.4%
clear-num66.3%
div-inv66.5%
Applied egg-rr66.5%
(FPCore (x y z t) :precision binary64 (if (<= x -1.9e-40) x (if (<= x 12500.0) (* z (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.9e-40) {
tmp = x;
} else if (x <= 12500.0) {
tmp = z * (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 (x <= (-1.9d-40)) then
tmp = x
else if (x <= 12500.0d0) then
tmp = z * (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 (x <= -1.9e-40) {
tmp = x;
} else if (x <= 12500.0) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.9e-40: tmp = x elif x <= 12500.0: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.9e-40) tmp = x; elseif (x <= 12500.0) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.9e-40) tmp = x; elseif (x <= 12500.0) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.9e-40], x, If[LessEqual[x, 12500.0], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{-40}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 12500:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.8999999999999999e-40 or 12500 < x Initial program 92.8%
Taylor expanded in y around 0 48.2%
if -1.8999999999999999e-40 < x < 12500Initial program 96.2%
Taylor expanded in y around -inf 78.3%
Taylor expanded in z around 0 78.3%
mul-1-neg96.2%
associate-/l*84.6%
distribute-lft-neg-in84.6%
*-commutative84.6%
associate-*r/87.2%
distribute-rgt-in90.8%
+-commutative90.8%
sub-neg90.8%
Simplified73.3%
Taylor expanded in z around inf 66.4%
Final simplification57.1%
(FPCore (x y z t) :precision binary64 (if (<= x -5.5e-41) x (if (<= x 78.0) (* y (/ z t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5.5e-41) {
tmp = x;
} else if (x <= 78.0) {
tmp = y * (z / 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 (x <= (-5.5d-41)) then
tmp = x
else if (x <= 78.0d0) then
tmp = y * (z / 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 (x <= -5.5e-41) {
tmp = x;
} else if (x <= 78.0) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -5.5e-41: tmp = x elif x <= 78.0: tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -5.5e-41) tmp = x; elseif (x <= 78.0) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -5.5e-41) tmp = x; elseif (x <= 78.0) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -5.5e-41], x, If[LessEqual[x, 78.0], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{-41}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 78:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.50000000000000022e-41 or 78 < x Initial program 92.8%
Taylor expanded in y around 0 48.2%
if -5.50000000000000022e-41 < x < 78Initial program 96.2%
Taylor expanded in y around inf 76.5%
Taylor expanded in z around inf 65.9%
(FPCore (x y z t) :precision binary64 (if (<= t -1.05e+100) (+ x (/ (- z x) (/ t y))) (+ x (/ (* y (- z x)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.05e+100) {
tmp = x + ((z - x) / (t / y));
} else {
tmp = x + ((y * (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 (t <= (-1.05d+100)) then
tmp = x + ((z - x) / (t / y))
else
tmp = x + ((y * (z - x)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.05e+100) {
tmp = x + ((z - x) / (t / y));
} else {
tmp = x + ((y * (z - x)) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.05e+100: tmp = x + ((z - x) / (t / y)) else: tmp = x + ((y * (z - x)) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.05e+100) tmp = Float64(x + Float64(Float64(z - x) / Float64(t / y))); else tmp = Float64(x + Float64(Float64(y * Float64(z - x)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.05e+100) tmp = x + ((z - x) / (t / y)); else tmp = x + ((y * (z - x)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.05e+100], N[(x + N[(N[(z - x), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+100}:\\
\;\;\;\;x + \frac{z - x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - x\right)}{t}\\
\end{array}
\end{array}
if t < -1.0499999999999999e100Initial program 77.6%
Taylor expanded in z around 0 77.4%
mul-1-neg77.4%
associate-/l*87.5%
distribute-lft-neg-in87.5%
*-commutative87.5%
associate-*r/99.9%
distribute-rgt-in99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 77.6%
associate-*r/96.4%
*-commutative96.4%
associate-/r/100.0%
Simplified100.0%
if -1.0499999999999999e100 < t Initial program 97.4%
(FPCore (x y z t) :precision binary64 (if (<= t -9.2e+99) (+ x (* (- z x) (/ y t))) (+ x (/ (* y (- z x)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9.2e+99) {
tmp = x + ((z - x) * (y / t));
} else {
tmp = x + ((y * (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 (t <= (-9.2d+99)) then
tmp = x + ((z - x) * (y / t))
else
tmp = x + ((y * (z - x)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9.2e+99) {
tmp = x + ((z - x) * (y / t));
} else {
tmp = x + ((y * (z - x)) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -9.2e+99: tmp = x + ((z - x) * (y / t)) else: tmp = x + ((y * (z - x)) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -9.2e+99) tmp = Float64(x + Float64(Float64(z - x) * Float64(y / t))); else tmp = Float64(x + Float64(Float64(y * Float64(z - x)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -9.2e+99) tmp = x + ((z - x) * (y / t)); else tmp = x + ((y * (z - x)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -9.2e+99], N[(x + N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+99}:\\
\;\;\;\;x + \left(z - x\right) \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - x\right)}{t}\\
\end{array}
\end{array}
if t < -9.20000000000000077e99Initial program 77.6%
Taylor expanded in z around 0 77.4%
mul-1-neg77.4%
associate-/l*87.5%
distribute-lft-neg-in87.5%
*-commutative87.5%
associate-*r/99.9%
distribute-rgt-in99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
if -9.20000000000000077e99 < t Initial program 97.4%
Final simplification97.8%
(FPCore (x y z t) :precision binary64 (+ x (* (- z x) (/ y t))))
double code(double x, double y, double z, double t) {
return x + ((z - x) * (y / t));
}
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 + ((z - x) * (y / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((z - x) * (y / t));
}
def code(x, y, z, t): return x + ((z - x) * (y / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(z - x) * Float64(y / t))) end
function tmp = code(x, y, z, t) tmp = x + ((z - x) * (y / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - x\right) \cdot \frac{y}{t}
\end{array}
Initial program 94.5%
Taylor expanded in z around 0 90.5%
mul-1-neg90.5%
associate-/l*87.1%
distribute-lft-neg-in87.1%
*-commutative87.1%
associate-*r/87.9%
distribute-rgt-in95.5%
+-commutative95.5%
sub-neg95.5%
Simplified95.5%
Final simplification95.5%
(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 94.5%
Taylor expanded in y around 0 34.2%
(FPCore (x y z t) :precision binary64 (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))
double code(double x, double y, double z, double t) {
return x - ((x * (y / t)) + (-z * (y / t)));
}
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 - ((x * (y / t)) + (-z * (y / t)))
end function
public static double code(double x, double y, double z, double t) {
return x - ((x * (y / t)) + (-z * (y / t)));
}
def code(x, y, z, t): return x - ((x * (y / t)) + (-z * (y / t)))
function code(x, y, z, t) return Float64(x - Float64(Float64(x * Float64(y / t)) + Float64(Float64(-z) * Float64(y / t)))) end
function tmp = code(x, y, z, t) tmp = x - ((x * (y / t)) + (-z * (y / t))); end
code[x_, y_, z_, t_] := N[(x - N[(N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[((-z) * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(x \cdot \frac{y}{t} + \left(-z\right) \cdot \frac{y}{t}\right)
\end{array}
herbie shell --seed 2024139
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:alt
(! :herbie-platform default (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))
(+ x (/ (* y (- z x)) t)))