
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= z -1.4e+163) (+ x (* (- z t) (/ y (- a t)))) (+ x (/ y (/ (- a t) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+163) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.4d+163)) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = x + (y / ((a - t) / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+163) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e+163: tmp = x + ((z - t) * (y / (a - t))) else: tmp = x + (y / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e+163) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.4e+163) tmp = x + ((z - t) * (y / (a - t))); else tmp = x + (y / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+163], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+163}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if z < -1.40000000000000007e163Initial program 92.1%
*-commutative92.1%
associate-/l*97.2%
Applied egg-rr97.2%
if -1.40000000000000007e163 < z Initial program 81.1%
associate-/l*99.5%
Simplified99.5%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6e-49)
(+ x y)
(if (<= t 5.9e-21)
(+ x (* z (/ y a)))
(if (<= t 2.4e+118) (- x (/ y (/ t z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e-49) {
tmp = x + y;
} else if (t <= 5.9e-21) {
tmp = x + (z * (y / a));
} else if (t <= 2.4e+118) {
tmp = x - (y / (t / z));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6d-49)) then
tmp = x + y
else if (t <= 5.9d-21) then
tmp = x + (z * (y / a))
else if (t <= 2.4d+118) then
tmp = x - (y / (t / z))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e-49) {
tmp = x + y;
} else if (t <= 5.9e-21) {
tmp = x + (z * (y / a));
} else if (t <= 2.4e+118) {
tmp = x - (y / (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6e-49: tmp = x + y elif t <= 5.9e-21: tmp = x + (z * (y / a)) elif t <= 2.4e+118: tmp = x - (y / (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e-49) tmp = Float64(x + y); elseif (t <= 5.9e-21) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (t <= 2.4e+118) tmp = Float64(x - Float64(y / Float64(t / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6e-49) tmp = x + y; elseif (t <= 5.9e-21) tmp = x + (z * (y / a)); elseif (t <= 2.4e+118) tmp = x - (y / (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e-49], N[(x + y), $MachinePrecision], If[LessEqual[t, 5.9e-21], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+118], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-49}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{-21}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+118}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -6e-49 or 2.4e118 < t Initial program 66.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 84.2%
if -6e-49 < t < 5.9000000000000003e-21Initial program 97.2%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in t around 0 81.5%
*-commutative81.5%
associate-/l*82.3%
Applied egg-rr82.3%
if 5.9000000000000003e-21 < t < 2.4e118Initial program 89.1%
associate-/l*99.9%
Simplified99.9%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 83.4%
Taylor expanded in a around 0 75.2%
neg-mul-175.2%
distribute-neg-frac275.2%
Simplified75.2%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.6e-51)
(+ x y)
(if (<= t 7.8e-24)
(+ x (* z (/ y a)))
(if (<= t 2.9e+118) (- x (* y (/ z t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e-51) {
tmp = x + y;
} else if (t <= 7.8e-24) {
tmp = x + (z * (y / a));
} else if (t <= 2.9e+118) {
tmp = x - (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.6d-51)) then
tmp = x + y
else if (t <= 7.8d-24) then
tmp = x + (z * (y / a))
else if (t <= 2.9d+118) then
tmp = x - (y * (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e-51) {
tmp = x + y;
} else if (t <= 7.8e-24) {
tmp = x + (z * (y / a));
} else if (t <= 2.9e+118) {
tmp = x - (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.6e-51: tmp = x + y elif t <= 7.8e-24: tmp = x + (z * (y / a)) elif t <= 2.9e+118: tmp = x - (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.6e-51) tmp = Float64(x + y); elseif (t <= 7.8e-24) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (t <= 2.9e+118) tmp = Float64(x - Float64(y * Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.6e-51) tmp = x + y; elseif (t <= 7.8e-24) tmp = x + (z * (y / a)); elseif (t <= 2.9e+118) tmp = x - (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.6e-51], N[(x + y), $MachinePrecision], If[LessEqual[t, 7.8e-24], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+118], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-51}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-24}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+118}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.6e-51 or 2.90000000000000016e118 < t Initial program 66.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 84.2%
if -3.6e-51 < t < 7.8e-24Initial program 97.2%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in t around 0 81.5%
*-commutative81.5%
associate-/l*82.3%
Applied egg-rr82.3%
if 7.8e-24 < t < 2.90000000000000016e118Initial program 89.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 75.4%
associate-/l*83.4%
Simplified83.4%
Taylor expanded in a around 0 72.5%
metadata-eval72.5%
associate-*r/75.2%
cancel-sign-sub-inv75.2%
*-commutative75.2%
*-rgt-identity75.2%
Simplified75.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8.2e+39) (not (<= t 12.5))) (+ x (- y (* y (/ z t)))) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.2e+39) || !(t <= 12.5)) {
tmp = x + (y - (y * (z / t)));
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-8.2d+39)) .or. (.not. (t <= 12.5d0))) then
tmp = x + (y - (y * (z / t)))
else
tmp = x + (y * (z / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.2e+39) || !(t <= 12.5)) {
tmp = x + (y - (y * (z / t)));
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8.2e+39) or not (t <= 12.5): tmp = x + (y - (y * (z / t))) else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8.2e+39) || !(t <= 12.5)) tmp = Float64(x + Float64(y - Float64(y * Float64(z / t)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8.2e+39) || ~((t <= 12.5))) tmp = x + (y - (y * (z / t))); else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8.2e+39], N[Not[LessEqual[t, 12.5]], $MachinePrecision]], N[(x + N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+39} \lor \neg \left(t \leq 12.5\right):\\
\;\;\;\;x + \left(y - y \cdot \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -8.20000000000000008e39 or 12.5 < t Initial program 66.3%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 60.6%
mul-1-neg60.6%
associate-/l*90.5%
div-sub90.5%
*-inverses90.5%
sub-neg90.5%
metadata-eval90.5%
distribute-lft-out90.5%
+-commutative90.5%
distribute-neg-in90.5%
distribute-rgt-neg-in90.5%
metadata-eval90.5%
*-rgt-identity90.5%
unsub-neg90.5%
Simplified90.5%
if -8.20000000000000008e39 < t < 12.5Initial program 97.1%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around inf 88.1%
associate-/l*86.0%
Simplified86.0%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3e+120) (not (<= t 1.55e+112))) (+ x y) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3e+120) || !(t <= 1.55e+112)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3d+120)) .or. (.not. (t <= 1.55d+112))) then
tmp = x + y
else
tmp = x + (y * (z / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3e+120) || !(t <= 1.55e+112)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3e+120) or not (t <= 1.55e+112): tmp = x + y else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3e+120) || !(t <= 1.55e+112)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3e+120) || ~((t <= 1.55e+112))) tmp = x + y; else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3e+120], N[Not[LessEqual[t, 1.55e+112]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+120} \lor \neg \left(t \leq 1.55 \cdot 10^{+112}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -3e120 or 1.54999999999999991e112 < t Initial program 56.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 88.7%
if -3e120 < t < 1.54999999999999991e112Initial program 95.0%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in z around inf 84.1%
associate-/l*83.5%
Simplified83.5%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e-6) (+ x (/ (* z y) (- a t))) (if (<= z 8e-16) (+ x (* y (/ t (- t a)))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e-6) {
tmp = x + ((z * y) / (a - t));
} else if (z <= 8e-16) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9d-6)) then
tmp = x + ((z * y) / (a - t))
else if (z <= 8d-16) then
tmp = x + (y * (t / (t - a)))
else
tmp = x + (y / ((a - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e-6) {
tmp = x + ((z * y) / (a - t));
} else if (z <= 8e-16) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e-6: tmp = x + ((z * y) / (a - t)) elif z <= 8e-16: tmp = x + (y * (t / (t - a))) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e-6) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); elseif (z <= 8e-16) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9e-6) tmp = x + ((z * y) / (a - t)); elseif (z <= 8e-16) tmp = x + (y * (t / (t - a))); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e-6], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-16], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-16}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if z < -9.00000000000000023e-6Initial program 90.9%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in z around inf 85.4%
if -9.00000000000000023e-6 < z < 7.9999999999999998e-16Initial program 79.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 76.1%
associate-*r/76.1%
mul-1-neg76.1%
distribute-lft-neg-out76.1%
*-commutative76.1%
associate-/l*96.4%
distribute-neg-frac96.4%
distribute-neg-frac296.4%
neg-sub096.4%
associate--r-96.4%
neg-sub096.4%
Simplified96.4%
if 7.9999999999999998e-16 < z Initial program 78.9%
associate-/l*98.5%
Simplified98.5%
clear-num98.5%
un-div-inv99.2%
Applied egg-rr99.2%
Taylor expanded in z around inf 82.2%
Final simplification89.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.00195) (+ x (/ (* z y) (- a t))) (if (<= z 8.2e-13) (+ x (/ y (- 1.0 (/ a t)))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.00195) {
tmp = x + ((z * y) / (a - t));
} else if (z <= 8.2e-13) {
tmp = x + (y / (1.0 - (a / t)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-0.00195d0)) then
tmp = x + ((z * y) / (a - t))
else if (z <= 8.2d-13) then
tmp = x + (y / (1.0d0 - (a / t)))
else
tmp = x + (y / ((a - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.00195) {
tmp = x + ((z * y) / (a - t));
} else if (z <= 8.2e-13) {
tmp = x + (y / (1.0 - (a / t)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.00195: tmp = x + ((z * y) / (a - t)) elif z <= 8.2e-13: tmp = x + (y / (1.0 - (a / t))) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.00195) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); elseif (z <= 8.2e-13) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.00195) tmp = x + ((z * y) / (a - t)); elseif (z <= 8.2e-13) tmp = x + (y / (1.0 - (a / t))); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.00195], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-13], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00195:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if z < -0.0019499999999999999Initial program 90.9%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in z around inf 85.4%
if -0.0019499999999999999 < z < 8.2000000000000004e-13Initial program 79.7%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
div-sub99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 96.3%
mul-1-neg96.3%
unsub-neg96.3%
Simplified96.3%
if 8.2000000000000004e-13 < z Initial program 78.9%
associate-/l*98.5%
Simplified98.5%
clear-num98.5%
un-div-inv99.2%
Applied egg-rr99.2%
Taylor expanded in z around inf 82.2%
Final simplification89.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.6e-49) (+ x (/ y (- 1.0 (/ a t)))) (if (<= t 15.0) (+ x (/ y (/ (- a t) z))) (+ x (- y (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e-49) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 15.0) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = x + (y - (y * (z / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.6d-49)) then
tmp = x + (y / (1.0d0 - (a / t)))
else if (t <= 15.0d0) then
tmp = x + (y / ((a - t) / z))
else
tmp = x + (y - (y * (z / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e-49) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 15.0) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = x + (y - (y * (z / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.6e-49: tmp = x + (y / (1.0 - (a / t))) elif t <= 15.0: tmp = x + (y / ((a - t) / z)) else: tmp = x + (y - (y * (z / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.6e-49) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); elseif (t <= 15.0) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); else tmp = Float64(x + Float64(y - Float64(y * Float64(z / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.6e-49) tmp = x + (y / (1.0 - (a / t))); elseif (t <= 15.0) tmp = x + (y / ((a - t) / z)); else tmp = x + (y - (y * (z / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.6e-49], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 15.0], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{elif}\;t \leq 15:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - y \cdot \frac{z}{t}\right)\\
\end{array}
\end{array}
if t < -3.5999999999999997e-49Initial program 73.0%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
div-sub99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 90.3%
mul-1-neg90.3%
unsub-neg90.3%
Simplified90.3%
if -3.5999999999999997e-49 < t < 15Initial program 96.6%
associate-/l*94.2%
Simplified94.2%
clear-num94.1%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in z around inf 86.5%
if 15 < t Initial program 69.5%
associate-/l*99.9%
Simplified99.9%
clear-num100.0%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 63.7%
mul-1-neg63.7%
associate-/l*90.0%
div-sub90.0%
*-inverses90.0%
sub-neg90.0%
metadata-eval90.0%
distribute-lft-out90.0%
+-commutative90.0%
distribute-neg-in90.0%
distribute-rgt-neg-in90.0%
metadata-eval90.0%
*-rgt-identity90.0%
unsub-neg90.0%
Simplified90.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.1e-49) (+ x (/ y (- 1.0 (/ a t)))) (if (<= t 9.5) (+ x (* y (/ z (- a t)))) (+ x (- y (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e-49) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 9.5) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + (y - (y * (z / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.1d-49)) then
tmp = x + (y / (1.0d0 - (a / t)))
else if (t <= 9.5d0) then
tmp = x + (y * (z / (a - t)))
else
tmp = x + (y - (y * (z / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e-49) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 9.5) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + (y - (y * (z / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.1e-49: tmp = x + (y / (1.0 - (a / t))) elif t <= 9.5: tmp = x + (y * (z / (a - t))) else: tmp = x + (y - (y * (z / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.1e-49) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); elseif (t <= 9.5) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(x + Float64(y - Float64(y * Float64(z / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.1e-49) tmp = x + (y / (1.0 - (a / t))); elseif (t <= 9.5) tmp = x + (y * (z / (a - t))); else tmp = x + (y - (y * (z / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e-49], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{elif}\;t \leq 9.5:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - y \cdot \frac{z}{t}\right)\\
\end{array}
\end{array}
if t < -2.0999999999999999e-49Initial program 73.0%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
div-sub99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 90.3%
mul-1-neg90.3%
unsub-neg90.3%
Simplified90.3%
if -2.0999999999999999e-49 < t < 9.5Initial program 96.6%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in z around inf 88.4%
associate-/l*86.0%
Simplified86.0%
if 9.5 < t Initial program 69.5%
associate-/l*99.9%
Simplified99.9%
clear-num100.0%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 63.7%
mul-1-neg63.7%
associate-/l*90.0%
div-sub90.0%
*-inverses90.0%
sub-neg90.0%
metadata-eval90.0%
distribute-lft-out90.0%
+-commutative90.0%
distribute-neg-in90.0%
distribute-rgt-neg-in90.0%
metadata-eval90.0%
*-rgt-identity90.0%
unsub-neg90.0%
Simplified90.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.2e-50) (not (<= t 50.0))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.2e-50) || !(t <= 50.0)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-6.2d-50)) .or. (.not. (t <= 50.0d0))) then
tmp = x + y
else
tmp = x + (z * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.2e-50) || !(t <= 50.0)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.2e-50) or not (t <= 50.0): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.2e-50) || !(t <= 50.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.2e-50) || ~((t <= 50.0))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.2e-50], N[Not[LessEqual[t, 50.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-50} \lor \neg \left(t \leq 50\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -6.2000000000000004e-50 or 50 < t Initial program 71.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 80.9%
if -6.2000000000000004e-50 < t < 50Initial program 96.6%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in t around 0 78.4%
*-commutative78.4%
associate-/l*80.0%
Applied egg-rr80.0%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.7e-51) (not (<= t 15.5))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.7e-51) || !(t <= 15.5)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-4.7d-51)) .or. (.not. (t <= 15.5d0))) then
tmp = x + y
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.7e-51) || !(t <= 15.5)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.7e-51) or not (t <= 15.5): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.7e-51) || !(t <= 15.5)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.7e-51) || ~((t <= 15.5))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.7e-51], N[Not[LessEqual[t, 15.5]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{-51} \lor \neg \left(t \leq 15.5\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -4.6999999999999997e-51 or 15.5 < t Initial program 71.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 80.9%
if -4.6999999999999997e-51 < t < 15.5Initial program 96.6%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in t around 0 78.4%
associate-/l*78.3%
Simplified78.3%
Final simplification79.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e+163) (+ x (* (- z t) (/ y (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+163) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y * ((z - t) / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.15d+163)) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = x + (y * ((z - t) / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+163) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y * ((z - t) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+163: tmp = x + ((z - t) * (y / (a - t))) else: tmp = x + (y * ((z - t) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+163) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+163) tmp = x + ((z - t) * (y / (a - t))); else tmp = x + (y * ((z - t) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+163], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+163}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if z < -1.15000000000000001e163Initial program 92.1%
*-commutative92.1%
associate-/l*97.2%
Applied egg-rr97.2%
if -1.15000000000000001e163 < z Initial program 81.1%
associate-/l*99.5%
Simplified99.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.35e-154) (not (<= t 9.5e-62))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.35e-154) || !(t <= 9.5e-62)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.35d-154)) .or. (.not. (t <= 9.5d-62))) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.35e-154) || !(t <= 9.5e-62)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.35e-154) or not (t <= 9.5e-62): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.35e-154) || !(t <= 9.5e-62)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.35e-154) || ~((t <= 9.5e-62))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.35e-154], N[Not[LessEqual[t, 9.5e-62]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-154} \lor \neg \left(t \leq 9.5 \cdot 10^{-62}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.34999999999999995e-154 or 9.49999999999999951e-62 < t Initial program 76.3%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in t around inf 70.8%
if -1.34999999999999995e-154 < t < 9.49999999999999951e-62Initial program 98.6%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in z around inf 93.5%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in x around inf 52.2%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 82.6%
associate-/l*97.3%
Simplified97.3%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 82.6%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 72.0%
associate-/l*72.3%
Simplified72.3%
Taylor expanded in x around inf 48.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2024085
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))