
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * (z - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * (z - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (fma (- z x) (/ y t) x))
double code(double x, double y, double z, double t) {
return fma((z - x), (y / t), x);
}
function code(x, y, z, t) return fma(Float64(z - x), Float64(y / t), x) end
code[x_, y_, z_, t_] := N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z - x, \frac{y}{t}, x\right)
\end{array}
Initial program 92.4%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6497.5
Applied rewrites97.5%
(FPCore (x y z t) :precision binary64 (if (<= y -45.0) (* (/ (- z x) t) y) (if (<= y 1.3e+125) (+ x (/ (* y z) t)) (* (/ y t) (- z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -45.0) {
tmp = ((z - x) / t) * y;
} else if (y <= 1.3e+125) {
tmp = x + ((y * z) / t);
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-45.0d0)) then
tmp = ((z - x) / t) * y
else if (y <= 1.3d+125) then
tmp = x + ((y * z) / t)
else
tmp = (y / t) * (z - x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -45.0) {
tmp = ((z - x) / t) * y;
} else if (y <= 1.3e+125) {
tmp = x + ((y * z) / t);
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -45.0: tmp = ((z - x) / t) * y elif y <= 1.3e+125: tmp = x + ((y * z) / t) else: tmp = (y / t) * (z - x) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -45.0) tmp = Float64(Float64(Float64(z - x) / t) * y); elseif (y <= 1.3e+125) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = Float64(Float64(y / t) * Float64(z - x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -45.0) tmp = ((z - x) / t) * y; elseif (y <= 1.3e+125) tmp = x + ((y * z) / t); else tmp = (y / t) * (z - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -45.0], N[(N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.3e+125], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -45:\\
\;\;\;\;\frac{z - x}{t} \cdot y\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+125}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\
\end{array}
\end{array}
if y < -45Initial program 86.0%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6496.6
Applied rewrites96.6%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6474.8
Applied rewrites74.8%
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-*l/N/A
lower-*.f64N/A
lift-/.f64N/A
lift--.f6482.7
Applied rewrites82.7%
if -45 < y < 1.30000000000000002e125Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites83.6%
if 1.30000000000000002e125 < y Initial program 82.5%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6495.6
Applied rewrites95.6%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6477.7
Applied rewrites77.7%
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6486.9
Applied rewrites86.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (fma y (/ z t) x)))
(if (<= z -1.15e+140)
(* (/ y t) (- z x))
(if (<= z -1.15e-137) t_1 (if (<= z 1.3e-59) (* (/ (- t y) t) x) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = fma(y, (z / t), x);
double tmp;
if (z <= -1.15e+140) {
tmp = (y / t) * (z - x);
} else if (z <= -1.15e-137) {
tmp = t_1;
} else if (z <= 1.3e-59) {
tmp = ((t - y) / t) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(y, Float64(z / t), x) tmp = 0.0 if (z <= -1.15e+140) tmp = Float64(Float64(y / t) * Float64(z - x)); elseif (z <= -1.15e-137) tmp = t_1; elseif (z <= 1.3e-59) tmp = Float64(Float64(Float64(t - y) / t) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.15e+140], N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-137], t$95$1, If[LessEqual[z, 1.3e-59], N[(N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+140}:\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-59}:\\
\;\;\;\;\frac{t - y}{t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.14999999999999995e140Initial program 88.2%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6497.4
Applied rewrites97.4%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6466.8
Applied rewrites66.8%
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6474.5
Applied rewrites74.5%
if -1.14999999999999995e140 < z < -1.15000000000000004e-137 or 1.29999999999999999e-59 < z Initial program 92.2%
Taylor expanded in x around 0
Applied rewrites79.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6480.0
Applied rewrites80.0%
if -1.15000000000000004e-137 < z < 1.29999999999999999e-59Initial program 94.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-subN/A
metadata-evalN/A
*-lft-identityN/A
lower--.f64N/A
lower-/.f6487.4
Applied rewrites87.4%
Taylor expanded in t around 0
lower-/.f64N/A
lower--.f6487.4
Applied rewrites87.4%
(FPCore (x y z t) :precision binary64 (if (<= y -200.0) (* (/ (- z x) t) y) (if (<= y 1.1e+145) (fma y (/ z t) x) (* (/ y t) (- z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -200.0) {
tmp = ((z - x) / t) * y;
} else if (y <= 1.1e+145) {
tmp = fma(y, (z / t), x);
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= -200.0) tmp = Float64(Float64(Float64(z - x) / t) * y); elseif (y <= 1.1e+145) tmp = fma(y, Float64(z / t), x); else tmp = Float64(Float64(y / t) * Float64(z - x)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, -200.0], N[(N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.1e+145], N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -200:\\
\;\;\;\;\frac{z - x}{t} \cdot y\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+145}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\
\end{array}
\end{array}
if y < -200Initial program 85.9%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6496.6
Applied rewrites96.6%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6474.7
Applied rewrites74.7%
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-*l/N/A
lower-*.f64N/A
lift-/.f64N/A
lift--.f6482.7
Applied rewrites82.7%
if -200 < y < 1.10000000000000004e145Initial program 97.2%
Taylor expanded in x around 0
Applied rewrites83.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6478.9
Applied rewrites78.9%
if 1.10000000000000004e145 < y Initial program 81.6%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6495.4
Applied rewrites95.4%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6477.6
Applied rewrites77.6%
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6487.6
Applied rewrites87.6%
(FPCore (x y z t) :precision binary64 (if (<= t -5.5e+80) (* (/ (- t y) t) x) (if (<= t 1750.0) (/ (* (- z x) y) t) (fma y (/ z t) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.5e+80) {
tmp = ((t - y) / t) * x;
} else if (t <= 1750.0) {
tmp = ((z - x) * y) / t;
} else {
tmp = fma(y, (z / t), x);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (t <= -5.5e+80) tmp = Float64(Float64(Float64(t - y) / t) * x); elseif (t <= 1750.0) tmp = Float64(Float64(Float64(z - x) * y) / t); else tmp = fma(y, Float64(z / t), x); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.5e+80], N[(N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1750.0], N[(N[(N[(z - x), $MachinePrecision] * y), $MachinePrecision] / t), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+80}:\\
\;\;\;\;\frac{t - y}{t} \cdot x\\
\mathbf{elif}\;t \leq 1750:\\
\;\;\;\;\frac{\left(z - x\right) \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\end{array}
\end{array}
if t < -5.49999999999999967e80Initial program 82.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-subN/A
metadata-evalN/A
*-lft-identityN/A
lower--.f64N/A
lower-/.f6474.6
Applied rewrites74.6%
Taylor expanded in t around 0
lower-/.f64N/A
lower--.f6474.6
Applied rewrites74.6%
if -5.49999999999999967e80 < t < 1750Initial program 98.2%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6480.0
Applied rewrites80.0%
if 1750 < t Initial program 87.3%
Taylor expanded in x around 0
Applied rewrites81.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6487.1
Applied rewrites87.1%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (fma y (/ z t) x))) (if (<= z -1.15e-137) t_1 (if (<= z 1.3e-59) (* (/ (- t y) t) x) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(y, (z / t), x);
double tmp;
if (z <= -1.15e-137) {
tmp = t_1;
} else if (z <= 1.3e-59) {
tmp = ((t - y) / t) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(y, Float64(z / t), x) tmp = 0.0 if (z <= -1.15e-137) tmp = t_1; elseif (z <= 1.3e-59) tmp = Float64(Float64(Float64(t - y) / t) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.15e-137], t$95$1, If[LessEqual[z, 1.3e-59], N[(N[(N[(t - y), $MachinePrecision] / t), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-59}:\\
\;\;\;\;\frac{t - y}{t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.15000000000000004e-137 or 1.29999999999999999e-59 < z Initial program 91.4%
Taylor expanded in x around 0
Applied rewrites80.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6481.1
Applied rewrites81.1%
if -1.15000000000000004e-137 < z < 1.29999999999999999e-59Initial program 94.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-subN/A
metadata-evalN/A
*-lft-identityN/A
lower--.f64N/A
lower-/.f6487.4
Applied rewrites87.4%
Taylor expanded in t around 0
lower-/.f64N/A
lower--.f6487.4
Applied rewrites87.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (fma y (/ z t) x))) (if (<= z -2.15e-262) t_1 (if (<= z 1.3e-200) (/ (* (- x) y) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(y, (z / t), x);
double tmp;
if (z <= -2.15e-262) {
tmp = t_1;
} else if (z <= 1.3e-200) {
tmp = (-x * y) / t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(y, Float64(z / t), x) tmp = 0.0 if (z <= -2.15e-262) tmp = t_1; elseif (z <= 1.3e-200) tmp = Float64(Float64(Float64(-x) * y) / t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -2.15e-262], t$95$1, If[LessEqual[z, 1.3e-200], N[(N[((-x) * y), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-200}:\\
\;\;\;\;\frac{\left(-x\right) \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1500000000000001e-262 or 1.29999999999999995e-200 < z Initial program 92.3%
Taylor expanded in x around 0
Applied rewrites76.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6476.3
Applied rewrites76.3%
if -2.1500000000000001e-262 < z < 1.29999999999999995e-200Initial program 92.7%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6495.3
Applied rewrites95.3%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6446.9
Applied rewrites46.9%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6442.8
Applied rewrites42.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* z y) t)))
(if (<= z -6.5e-20)
t_1
(if (<= z -2.15e-262)
x
(if (<= z 2.7e-130) (/ (* (- x) y) t) (if (<= z 2.1e-33) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * y) / t;
double tmp;
if (z <= -6.5e-20) {
tmp = t_1;
} else if (z <= -2.15e-262) {
tmp = x;
} else if (z <= 2.7e-130) {
tmp = (-x * y) / t;
} else if (z <= 2.1e-33) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) / t
if (z <= (-6.5d-20)) then
tmp = t_1
else if (z <= (-2.15d-262)) then
tmp = x
else if (z <= 2.7d-130) then
tmp = (-x * y) / t
else if (z <= 2.1d-33) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * y) / t;
double tmp;
if (z <= -6.5e-20) {
tmp = t_1;
} else if (z <= -2.15e-262) {
tmp = x;
} else if (z <= 2.7e-130) {
tmp = (-x * y) / t;
} else if (z <= 2.1e-33) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * y) / t tmp = 0 if z <= -6.5e-20: tmp = t_1 elif z <= -2.15e-262: tmp = x elif z <= 2.7e-130: tmp = (-x * y) / t elif z <= 2.1e-33: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * y) / t) tmp = 0.0 if (z <= -6.5e-20) tmp = t_1; elseif (z <= -2.15e-262) tmp = x; elseif (z <= 2.7e-130) tmp = Float64(Float64(Float64(-x) * y) / t); elseif (z <= 2.1e-33) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * y) / t; tmp = 0.0; if (z <= -6.5e-20) tmp = t_1; elseif (z <= -2.15e-262) tmp = x; elseif (z <= 2.7e-130) tmp = (-x * y) / t; elseif (z <= 2.1e-33) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -6.5e-20], t$95$1, If[LessEqual[z, -2.15e-262], x, If[LessEqual[z, 2.7e-130], N[(N[((-x) * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.1e-33], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot y}{t}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-262}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-130}:\\
\;\;\;\;\frac{\left(-x\right) \cdot y}{t}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-33}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.50000000000000032e-20 or 2.1e-33 < z Initial program 90.5%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6455.1
Applied rewrites55.1%
if -6.50000000000000032e-20 < z < -2.1500000000000001e-262 or 2.69999999999999991e-130 < z < 2.1e-33Initial program 95.3%
Taylor expanded in y around 0
Applied rewrites48.6%
if -2.1500000000000001e-262 < z < 2.69999999999999991e-130Initial program 93.6%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6495.6
Applied rewrites95.6%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6448.2
Applied rewrites48.2%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6441.5
Applied rewrites41.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* z y) t)))
(if (<= z -6.5e-20)
t_1
(if (<= z -2.15e-262)
x
(if (<= z 3.2e-128) (- (* x (/ y t))) (if (<= z 2.1e-33) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * y) / t;
double tmp;
if (z <= -6.5e-20) {
tmp = t_1;
} else if (z <= -2.15e-262) {
tmp = x;
} else if (z <= 3.2e-128) {
tmp = -(x * (y / t));
} else if (z <= 2.1e-33) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) / t
if (z <= (-6.5d-20)) then
tmp = t_1
else if (z <= (-2.15d-262)) then
tmp = x
else if (z <= 3.2d-128) then
tmp = -(x * (y / t))
else if (z <= 2.1d-33) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * y) / t;
double tmp;
if (z <= -6.5e-20) {
tmp = t_1;
} else if (z <= -2.15e-262) {
tmp = x;
} else if (z <= 3.2e-128) {
tmp = -(x * (y / t));
} else if (z <= 2.1e-33) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * y) / t tmp = 0 if z <= -6.5e-20: tmp = t_1 elif z <= -2.15e-262: tmp = x elif z <= 3.2e-128: tmp = -(x * (y / t)) elif z <= 2.1e-33: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * y) / t) tmp = 0.0 if (z <= -6.5e-20) tmp = t_1; elseif (z <= -2.15e-262) tmp = x; elseif (z <= 3.2e-128) tmp = Float64(-Float64(x * Float64(y / t))); elseif (z <= 2.1e-33) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * y) / t; tmp = 0.0; if (z <= -6.5e-20) tmp = t_1; elseif (z <= -2.15e-262) tmp = x; elseif (z <= 3.2e-128) tmp = -(x * (y / t)); elseif (z <= 2.1e-33) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -6.5e-20], t$95$1, If[LessEqual[z, -2.15e-262], x, If[LessEqual[z, 3.2e-128], (-N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]), If[LessEqual[z, 2.1e-33], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot y}{t}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-262}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-128}:\\
\;\;\;\;-x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-33}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.50000000000000032e-20 or 2.1e-33 < z Initial program 90.5%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6455.1
Applied rewrites55.1%
if -6.50000000000000032e-20 < z < -2.1500000000000001e-262 or 3.1999999999999998e-128 < z < 2.1e-33Initial program 95.3%
Taylor expanded in y around 0
Applied rewrites48.5%
if -2.1500000000000001e-262 < z < 3.1999999999999998e-128Initial program 93.6%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f6495.7
Applied rewrites95.7%
Taylor expanded in y around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6448.0
Applied rewrites48.0%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6441.6
Applied rewrites41.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (* z y) t))) (if (<= z -6.5e-20) t_1 (if (<= z 2.1e-33) x t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (z * y) / t;
double tmp;
if (z <= -6.5e-20) {
tmp = t_1;
} else if (z <= 2.1e-33) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) / t
if (z <= (-6.5d-20)) then
tmp = t_1
else if (z <= 2.1d-33) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * y) / t;
double tmp;
if (z <= -6.5e-20) {
tmp = t_1;
} else if (z <= 2.1e-33) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * y) / t tmp = 0 if z <= -6.5e-20: tmp = t_1 elif z <= 2.1e-33: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * y) / t) tmp = 0.0 if (z <= -6.5e-20) tmp = t_1; elseif (z <= 2.1e-33) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * y) / t; tmp = 0.0; if (z <= -6.5e-20) tmp = t_1; elseif (z <= 2.1e-33) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -6.5e-20], t$95$1, If[LessEqual[z, 2.1e-33], x, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot y}{t}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-33}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.50000000000000032e-20 or 2.1e-33 < z Initial program 90.5%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6455.1
Applied rewrites55.1%
if -6.50000000000000032e-20 < z < 2.1e-33Initial program 94.6%
Taylor expanded in y around 0
Applied rewrites49.1%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 92.4%
Taylor expanded in y around 0
Applied rewrites38.6%
herbie shell --seed 2025114
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
(+ x (/ (* y (- z x)) t)))