
(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 9 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 (<= x -2.5e-130) (+ 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 (x <= -2.5e-130) {
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 (x <= (-2.5d-130)) 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 (x <= -2.5e-130) {
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 x <= -2.5e-130: 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 (x <= -2.5e-130) 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 (x <= -2.5e-130) 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[x, -2.5e-130], 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}\;x \leq -2.5 \cdot 10^{-130}:\\
\;\;\;\;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 x < -2.4999999999999998e-130Initial program 85.4%
*-commutative85.4%
associate-/l*98.9%
Applied egg-rr98.9%
if -2.4999999999999998e-130 < x Initial program 88.2%
associate-/l*99.4%
Simplified99.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.5e+98) (not (<= t 3.1e+24))) (- x (* y (+ (/ z t) -1.0))) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.5e+98) || !(t <= 3.1e+24)) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = x + (z * (y / (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 <= (-5.5d+98)) .or. (.not. (t <= 3.1d+24))) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else
tmp = x + (z * (y / (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 <= -5.5e+98) || !(t <= 3.1e+24)) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.5e+98) or not (t <= 3.1e+24): tmp = x - (y * ((z / t) + -1.0)) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.5e+98) || !(t <= 3.1e+24)) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.5e+98) || ~((t <= 3.1e+24))) tmp = x - (y * ((z / t) + -1.0)); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.5e+98], N[Not[LessEqual[t, 3.1e+24]], $MachinePrecision]], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+98} \lor \neg \left(t \leq 3.1 \cdot 10^{+24}\right):\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -5.49999999999999946e98 or 3.10000000000000011e24 < t Initial program 76.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 69.5%
mul-1-neg69.5%
unsub-neg69.5%
associate-/l*90.0%
div-sub90.0%
sub-neg90.0%
*-inverses90.0%
metadata-eval90.0%
Simplified90.0%
if -5.49999999999999946e98 < t < 3.10000000000000011e24Initial program 93.9%
*-commutative93.9%
associate-/l*97.5%
Applied egg-rr97.5%
Taylor expanded in z around inf 89.6%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.5e+99) (not (<= t 1.12e+145))) (+ x y) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.5e+99) || !(t <= 1.12e+145)) {
tmp = x + y;
} else {
tmp = x + (z * (y / (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 <= (-4.5d+99)) .or. (.not. (t <= 1.12d+145))) then
tmp = x + y
else
tmp = x + (z * (y / (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 <= -4.5e+99) || !(t <= 1.12e+145)) {
tmp = x + y;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.5e+99) or not (t <= 1.12e+145): tmp = x + y else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.5e+99) || !(t <= 1.12e+145)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.5e+99) || ~((t <= 1.12e+145))) tmp = x + y; else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.5e+99], N[Not[LessEqual[t, 1.12e+145]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+99} \lor \neg \left(t \leq 1.12 \cdot 10^{+145}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -4.5e99 or 1.12000000000000003e145 < t Initial program 73.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -4.5e99 < t < 1.12000000000000003e145Initial program 93.1%
*-commutative93.1%
associate-/l*97.2%
Applied egg-rr97.2%
Taylor expanded in z around inf 86.7%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -7e+59) (+ x (/ y (/ (- a t) z))) (if (<= z 2.2e+14) (+ x (* y (/ t (- t a)))) (+ x (* z (/ y (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e+59) {
tmp = x + (y / ((a - t) / z));
} else if (z <= 2.2e+14) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (z * (y / (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 <= (-7d+59)) then
tmp = x + (y / ((a - t) / z))
else if (z <= 2.2d+14) then
tmp = x + (y * (t / (t - a)))
else
tmp = x + (z * (y / (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 <= -7e+59) {
tmp = x + (y / ((a - t) / z));
} else if (z <= 2.2e+14) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e+59: tmp = x + (y / ((a - t) / z)) elif z <= 2.2e+14: tmp = x + (y * (t / (t - a))) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e+59) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); elseif (z <= 2.2e+14) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7e+59) tmp = x + (y / ((a - t) / z)); elseif (z <= 2.2e+14) tmp = x + (y * (t / (t - a))); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+59], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+14], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+14}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if z < -7e59Initial program 87.4%
associate-/l*96.5%
Simplified96.5%
clear-num96.5%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in z around inf 87.4%
if -7e59 < z < 2.2e14Initial program 89.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 77.8%
+-commutative77.8%
associate-*r/77.8%
mul-1-neg77.8%
distribute-lft-neg-out77.8%
*-commutative77.8%
*-lft-identity77.8%
times-frac88.5%
/-rgt-identity88.5%
distribute-neg-frac88.5%
distribute-neg-frac288.5%
neg-sub088.5%
sub-neg88.5%
+-commutative88.5%
associate--r+88.5%
neg-sub088.5%
remove-double-neg88.5%
Simplified88.5%
if 2.2e14 < z Initial program 82.5%
*-commutative82.5%
associate-/l*94.7%
Applied egg-rr94.7%
Taylor expanded in z around inf 87.6%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.15e-95) (not (<= t 2.4e+24))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.15e-95) || !(t <= 2.4e+24)) {
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 <= (-1.15d-95)) .or. (.not. (t <= 2.4d+24))) 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 <= -1.15e-95) || !(t <= 2.4e+24)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.15e-95) or not (t <= 2.4e+24): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.15e-95) || !(t <= 2.4e+24)) 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 <= -1.15e-95) || ~((t <= 2.4e+24))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.15e-95], N[Not[LessEqual[t, 2.4e+24]], $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 -1.15 \cdot 10^{-95} \lor \neg \left(t \leq 2.4 \cdot 10^{+24}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -1.15e-95 or 2.4000000000000001e24 < t Initial program 79.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 74.3%
+-commutative74.3%
Simplified74.3%
if -1.15e-95 < t < 2.4000000000000001e24Initial program 95.9%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in t around 0 77.7%
+-commutative77.7%
associate-/l*77.6%
Simplified77.6%
clear-num77.5%
un-div-inv77.5%
Applied egg-rr77.5%
associate-/r/80.5%
Applied egg-rr80.5%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.15e-95) (not (<= t 1.4e+18))) (+ x y) (+ x (/ (* z y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.15e-95) || !(t <= 1.4e+18)) {
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 <= (-1.15d-95)) .or. (.not. (t <= 1.4d+18))) 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 <= -1.15e-95) || !(t <= 1.4e+18)) {
tmp = x + y;
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.15e-95) or not (t <= 1.4e+18): tmp = x + y else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.15e-95) || !(t <= 1.4e+18)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.15e-95) || ~((t <= 1.4e+18))) tmp = x + y; else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.15e-95], N[Not[LessEqual[t, 1.4e+18]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-95} \lor \neg \left(t \leq 1.4 \cdot 10^{+18}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if t < -1.15e-95 or 1.4e18 < t Initial program 79.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 73.8%
+-commutative73.8%
Simplified73.8%
if -1.15e-95 < t < 1.4e18Initial program 96.7%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in t around 0 78.4%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.6e-84) (not (<= t 6.5e+18))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.6e-84) || !(t <= 6.5e+18)) {
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.6d-84)) .or. (.not. (t <= 6.5d+18))) 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.6e-84) || !(t <= 6.5e+18)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.6e-84) or not (t <= 6.5e+18): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.6e-84) || !(t <= 6.5e+18)) 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.6e-84) || ~((t <= 6.5e+18))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.6e-84], N[Not[LessEqual[t, 6.5e+18]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-84} \lor \neg \left(t \leq 6.5 \cdot 10^{+18}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.6e-84 or 6.5e18 < t Initial program 79.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 74.3%
+-commutative74.3%
Simplified74.3%
if -1.6e-84 < t < 6.5e18Initial program 95.2%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in x around inf 54.4%
Final simplification64.8%
(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 87.2%
associate-/l*97.4%
Simplified97.4%
(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 87.2%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in x around inf 51.2%
(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 2024141
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- a t) (- z t)))))
(+ x (/ (* y (- z t)) (- a t))))