
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (- y a) (/ (- t x) z)))))
(if (<= z -4.6e+203)
t_1
(if (<= z 1.5e+228) (fma (- t x) (/ (- z y) (- z a)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y - a) * ((t - x) / z));
double tmp;
if (z <= -4.6e+203) {
tmp = t_1;
} else if (z <= 1.5e+228) {
tmp = fma((t - x), ((z - y) / (z - a)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y - a) * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -4.6e+203) tmp = t_1; elseif (z <= 1.5e+228) tmp = fma(Float64(t - x), Float64(Float64(z - y) / Float64(z - a)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y - a), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+203], t$95$1, If[LessEqual[z, 1.5e+228], N[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \left(y - a\right) \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+228}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{z - y}{z - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5999999999999998e203 or 1.5000000000000001e228 < z Initial program 26.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6457.2
Applied rewrites57.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6495.7
Applied rewrites95.7%
if -4.5999999999999998e203 < z < 1.5000000000000001e228Initial program 78.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6490.6
Applied rewrites90.6%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -0.0046)
t_1
(if (<= a 11.0) (fma (/ (fma t -1.0 x) z) (- y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -0.0046) {
tmp = t_1;
} else if (a <= 11.0) {
tmp = fma((fma(t, -1.0, x) / z), (y - a), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -0.0046) tmp = t_1; elseif (a <= 11.0) tmp = fma(Float64(fma(t, -1.0, x) / z), Float64(y - a), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -0.0046], t$95$1, If[LessEqual[a, 11.0], N[(N[(N[(t * -1.0 + x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -0.0046:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 11:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(t, -1, x\right)}{z}, y - a, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.0045999999999999999 or 11 < a Initial program 72.3%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.3
Applied rewrites80.3%
if -0.0045999999999999999 < a < 11Initial program 65.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -0.0046)
t_1
(if (<= a 11.0) (- t (* (- y a) (/ (- t x) z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -0.0046) {
tmp = t_1;
} else if (a <= 11.0) {
tmp = t - ((y - a) * ((t - x) / z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -0.0046) tmp = t_1; elseif (a <= 11.0) tmp = Float64(t - Float64(Float64(y - a) * Float64(Float64(t - x) / z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -0.0046], t$95$1, If[LessEqual[a, 11.0], N[(t - N[(N[(y - a), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -0.0046:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 11:\\
\;\;\;\;t - \left(y - a\right) \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.0045999999999999999 or 11 < a Initial program 72.3%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.3
Applied rewrites80.3%
if -0.0045999999999999999 < a < 11Initial program 65.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6478.4
Applied rewrites78.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6482.2
Applied rewrites82.2%
Final simplification81.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- y z) a) (- t x) x))) (if (<= a -0.0034) t_1 (if (<= a 10.5) (- t (/ (* (- t x) y) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -0.0034) {
tmp = t_1;
} else if (a <= 10.5) {
tmp = t - (((t - x) * y) / z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -0.0034) tmp = t_1; elseif (a <= 10.5) tmp = Float64(t - Float64(Float64(Float64(t - x) * y) / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -0.0034], t$95$1, If[LessEqual[a, 10.5], N[(t - N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -0.0034:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 10.5:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.00339999999999999981 or 10.5 < a Initial program 72.3%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.3
Applied rewrites80.3%
if -0.00339999999999999981 < a < 10.5Initial program 65.8%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6465.7
Applied rewrites65.7%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6474.0
Applied rewrites74.0%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (- t x) x)))
(if (<= z -1.4e+111)
t_1
(if (<= z -2.3e-90)
(/ (* y x) z)
(if (<= z 2050000000.0) (/ (* y t) a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -1.4e+111) {
tmp = t_1;
} else if (z <= -2.3e-90) {
tmp = (y * x) / z;
} else if (z <= 2050000000.0) {
tmp = (y * t) / a;
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = (t - x) + x
if (z <= (-1.4d+111)) then
tmp = t_1
else if (z <= (-2.3d-90)) then
tmp = (y * x) / z
else if (z <= 2050000000.0d0) then
tmp = (y * t) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -1.4e+111) {
tmp = t_1;
} else if (z <= -2.3e-90) {
tmp = (y * x) / z;
} else if (z <= 2050000000.0) {
tmp = (y * t) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -1.4e+111: tmp = t_1 elif z <= -2.3e-90: tmp = (y * x) / z elif z <= 2050000000.0: tmp = (y * t) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -1.4e+111) tmp = t_1; elseif (z <= -2.3e-90) tmp = Float64(Float64(y * x) / z); elseif (z <= 2050000000.0) tmp = Float64(Float64(y * t) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) + x; tmp = 0.0; if (z <= -1.4e+111) tmp = t_1; elseif (z <= -2.3e-90) tmp = (y * x) / z; elseif (z <= 2050000000.0) tmp = (y * t) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.4e+111], t$95$1, If[LessEqual[z, -2.3e-90], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2050000000.0], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-90}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{elif}\;z \leq 2050000000:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4e111 or 2.05e9 < z Initial program 42.7%
Taylor expanded in z around inf
lower--.f6444.2
Applied rewrites44.2%
if -1.4e111 < z < -2.2999999999999998e-90Initial program 81.5%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6481.6
Applied rewrites81.6%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6454.4
Applied rewrites54.4%
Taylor expanded in t around 0
Applied rewrites24.4%
if -2.2999999999999998e-90 < z < 2.05e9Initial program 89.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.5
Applied rewrites94.5%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.5
Applied rewrites76.5%
Taylor expanded in t around inf
Applied rewrites34.0%
Final simplification36.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -0.0046) (fma (/ (- t x) a) y x) (if (<= a 10.5) (- t (/ (* (- t x) y) z)) (fma (- t x) (/ y a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0046) {
tmp = fma(((t - x) / a), y, x);
} else if (a <= 10.5) {
tmp = t - (((t - x) * y) / z);
} else {
tmp = fma((t - x), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.0046) tmp = fma(Float64(Float64(t - x) / a), y, x); elseif (a <= 10.5) tmp = Float64(t - Float64(Float64(Float64(t - x) * y) / z)); else tmp = fma(Float64(t - x), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.0046], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[a, 10.5], N[(t - N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0046:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{elif}\;a \leq 10.5:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -0.0045999999999999999Initial program 65.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.3
Applied rewrites72.3%
if -0.0045999999999999999 < a < 10.5Initial program 65.8%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6465.7
Applied rewrites65.7%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6474.0
Applied rewrites74.0%
if 10.5 < a Initial program 79.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.5
Applied rewrites95.5%
Taylor expanded in z around 0
lower-/.f6479.4
Applied rewrites79.4%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -0.0046) (fma (/ (- t x) a) y x) (if (<= a 10.5) (- t (* (/ (- y) z) x)) (fma (- t x) (/ y a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0046) {
tmp = fma(((t - x) / a), y, x);
} else if (a <= 10.5) {
tmp = t - ((-y / z) * x);
} else {
tmp = fma((t - x), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.0046) tmp = fma(Float64(Float64(t - x) / a), y, x); elseif (a <= 10.5) tmp = Float64(t - Float64(Float64(Float64(-y) / z) * x)); else tmp = fma(Float64(t - x), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.0046], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[a, 10.5], N[(t - N[(N[((-y) / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0046:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{elif}\;a \leq 10.5:\\
\;\;\;\;t - \frac{-y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -0.0045999999999999999Initial program 65.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.3
Applied rewrites72.3%
if -0.0045999999999999999 < a < 10.5Initial program 65.8%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6465.7
Applied rewrites65.7%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6474.0
Applied rewrites74.0%
Taylor expanded in t around 0
Applied rewrites64.9%
if 10.5 < a Initial program 79.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.5
Applied rewrites95.5%
Taylor expanded in z around 0
lower-/.f6479.4
Applied rewrites79.4%
Final simplification70.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -0.0046) (fma (/ (- t x) a) y x) (if (<= a 0.98) (* (/ (- z y) z) t) (fma (- t x) (/ y a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0046) {
tmp = fma(((t - x) / a), y, x);
} else if (a <= 0.98) {
tmp = ((z - y) / z) * t;
} else {
tmp = fma((t - x), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.0046) tmp = fma(Float64(Float64(t - x) / a), y, x); elseif (a <= 0.98) tmp = Float64(Float64(Float64(z - y) / z) * t); else tmp = fma(Float64(t - x), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.0046], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[a, 0.98], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0046:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{elif}\;a \leq 0.98:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -0.0045999999999999999Initial program 65.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.3
Applied rewrites72.3%
if -0.0045999999999999999 < a < 0.97999999999999998Initial program 66.3%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6466.2
Applied rewrites66.2%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in t around inf
Applied rewrites60.7%
if 0.97999999999999998 < a Initial program 78.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.0
Applied rewrites94.0%
Taylor expanded in z around 0
lower-/.f6478.2
Applied rewrites78.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- t x) a) y x))) (if (<= a -0.0046) t_1 (if (<= a 0.98) (* (/ (- z y) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / a), y, x);
double tmp;
if (a <= -0.0046) {
tmp = t_1;
} else if (a <= 0.98) {
tmp = ((z - y) / z) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / a), y, x) tmp = 0.0 if (a <= -0.0046) tmp = t_1; elseif (a <= 0.98) tmp = Float64(Float64(Float64(z - y) / z) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]}, If[LessEqual[a, -0.0046], t$95$1, If[LessEqual[a, 0.98], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{if}\;a \leq -0.0046:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 0.98:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.0045999999999999999 or 0.97999999999999998 < a Initial program 71.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6473.3
Applied rewrites73.3%
if -0.0045999999999999999 < a < 0.97999999999999998Initial program 66.3%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6466.2
Applied rewrites66.2%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in t around inf
Applied rewrites60.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -0.16) (fma y (/ t a) x) (if (<= a 1360000000.0) (* (/ (- z y) z) t) (+ (/ (* y t) a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.16) {
tmp = fma(y, (t / a), x);
} else if (a <= 1360000000.0) {
tmp = ((z - y) / z) * t;
} else {
tmp = ((y * t) / a) + x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.16) tmp = fma(y, Float64(t / a), x); elseif (a <= 1360000000.0) tmp = Float64(Float64(Float64(z - y) / z) * t); else tmp = Float64(Float64(Float64(y * t) / a) + x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.16], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1360000000.0], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], N[(N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.16:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq 1360000000:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot t}{a} + x\\
\end{array}
\end{array}
if a < -0.160000000000000003Initial program 65.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.9
Applied rewrites71.9%
Taylor expanded in t around inf
Applied rewrites67.8%
if -0.160000000000000003 < a < 1.36e9Initial program 66.3%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6466.3
Applied rewrites66.3%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.6
Applied rewrites73.6%
Taylor expanded in t around inf
Applied rewrites59.4%
if 1.36e9 < a Initial program 79.3%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6474.1
Applied rewrites74.1%
Taylor expanded in t around inf
Applied rewrites62.5%
Final simplification62.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -0.16) (fma y (/ t a) x) (if (<= a 6.5) (* (/ (- z y) z) t) (fma y (/ (- x) a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.16) {
tmp = fma(y, (t / a), x);
} else if (a <= 6.5) {
tmp = ((z - y) / z) * t;
} else {
tmp = fma(y, (-x / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.16) tmp = fma(y, Float64(t / a), x); elseif (a <= 6.5) tmp = Float64(Float64(Float64(z - y) / z) * t); else tmp = fma(y, Float64(Float64(-x) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.16], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6.5], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], N[(y * N[((-x) / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.16:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq 6.5:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{-x}{a}, x\right)\\
\end{array}
\end{array}
if a < -0.160000000000000003Initial program 65.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.9
Applied rewrites71.9%
Taylor expanded in t around inf
Applied rewrites67.8%
if -0.160000000000000003 < a < 6.5Initial program 66.5%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6466.5
Applied rewrites66.5%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.2
Applied rewrites73.2%
Taylor expanded in t around inf
Applied rewrites60.3%
if 6.5 < a Initial program 78.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.0
Applied rewrites94.0%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.4
Applied rewrites74.4%
Taylor expanded in t around 0
Applied rewrites60.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -0.16) (fma y (/ t a) x) (if (<= a 6.5) (* (/ (- z y) z) t) (fma (/ y a) (- x) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.16) {
tmp = fma(y, (t / a), x);
} else if (a <= 6.5) {
tmp = ((z - y) / z) * t;
} else {
tmp = fma((y / a), -x, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.16) tmp = fma(y, Float64(t / a), x); elseif (a <= 6.5) tmp = Float64(Float64(Float64(z - y) / z) * t); else tmp = fma(Float64(y / a), Float64(-x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.16], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6.5], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * (-x) + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.16:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq 6.5:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, -x, x\right)\\
\end{array}
\end{array}
if a < -0.160000000000000003Initial program 65.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.9
Applied rewrites71.9%
Taylor expanded in t around inf
Applied rewrites67.8%
if -0.160000000000000003 < a < 6.5Initial program 66.5%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6466.5
Applied rewrites66.5%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.2
Applied rewrites73.2%
Taylor expanded in t around inf
Applied rewrites60.3%
if 6.5 < a Initial program 78.4%
Taylor expanded in t around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.4
Applied rewrites60.4%
Taylor expanded in z around 0
Applied rewrites60.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -1.65e+100) t_1 (if (<= z 5.5e+36) (fma y (/ t a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -1.65e+100) {
tmp = t_1;
} else if (z <= 5.5e+36) {
tmp = fma(y, (t / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -1.65e+100) tmp = t_1; elseif (z <= 5.5e+36) tmp = fma(y, Float64(t / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.65e+100], t$95$1, If[LessEqual[z, 5.5e+36], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.6500000000000001e100 or 5.5000000000000002e36 < z Initial program 41.3%
Taylor expanded in z around inf
lower--.f6444.9
Applied rewrites44.9%
if -1.6500000000000001e100 < z < 5.5000000000000002e36Initial program 86.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6492.0
Applied rewrites92.0%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.6
Applied rewrites66.6%
Taylor expanded in t around inf
Applied rewrites57.4%
Final simplification52.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= t -1.42e-129) t_1 (if (<= t 2.7e-64) (/ (* y x) z) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (t <= -1.42e-129) {
tmp = t_1;
} else if (t <= 2.7e-64) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = (t - x) + x
if (t <= (-1.42d-129)) then
tmp = t_1
else if (t <= 2.7d-64) then
tmp = (y * x) / z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (t <= -1.42e-129) {
tmp = t_1;
} else if (t <= 2.7e-64) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if t <= -1.42e-129: tmp = t_1 elif t <= 2.7e-64: tmp = (y * x) / z else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (t <= -1.42e-129) tmp = t_1; elseif (t <= 2.7e-64) tmp = Float64(Float64(y * x) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) + x; tmp = 0.0; if (t <= -1.42e-129) tmp = t_1; elseif (t <= 2.7e-64) tmp = (y * x) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -1.42e-129], t$95$1, If[LessEqual[t, 2.7e-64], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;t \leq -1.42 \cdot 10^{-129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-64}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.42e-129 or 2.69999999999999986e-64 < t Initial program 67.3%
Taylor expanded in z around inf
lower--.f6429.2
Applied rewrites29.2%
if -1.42e-129 < t < 2.69999999999999986e-64Initial program 73.1%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6473.1
Applied rewrites73.1%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6443.3
Applied rewrites43.3%
Taylor expanded in t around 0
Applied rewrites29.0%
Final simplification29.2%
(FPCore (x y z t a) :precision binary64 (+ (- t x) x))
double code(double x, double y, double z, double t, double a) {
return (t - x) + 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 = (t - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
def code(x, y, z, t, a): return (t - x) + x
function code(x, y, z, t, a) return Float64(Float64(t - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (t - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(t - x\right) + x
\end{array}
Initial program 69.1%
Taylor expanded in z around inf
lower--.f6422.9
Applied rewrites22.9%
Final simplification22.9%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 69.1%
Taylor expanded in t around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6438.5
Applied rewrites38.5%
Taylor expanded in z around inf
Applied rewrites2.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024254
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))