
(FPCore (x y z) :precision binary64 (* x (- 1 (* (- 1 y) z))))
double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (1.0d0 - ((1.0d0 - y) * z))
end function
public static double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
def code(x, y, z): return x * (1.0 - ((1.0 - y) * z))
function code(x, y, z) return Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z))) end
function tmp = code(x, y, z) tmp = x * (1.0 - ((1.0 - y) * z)); end
code[x_, y_, z_] := N[(x * N[(1 - N[(N[(1 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (* x (- 1 (* (- 1 y) z))))
double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (1.0d0 - ((1.0d0 - y) * z))
end function
public static double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
def code(x, y, z): return x * (1.0 - ((1.0 - y) * z))
function code(x, y, z) return Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z))) end
function tmp = code(x, y, z) tmp = x * (1.0 - ((1.0 - y) * z)); end
code[x_, y_, z_] := N[(x * N[(1 - N[(N[(1 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
(FPCore (x y z) :precision binary64 (134-z0z1z2z3z4 x z y (- z 1) 1))
\mathsf{134\_z0z1z2z3z4}\left(x, z, y, \left(z - 1\right), 1\right)
Initial program 95.8%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
add-flipN/A
remove-double-negN/A
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
distribute-rgt1-inN/A
*-commutativeN/A
associate--r+N/A
*-commutativeN/A
metadata-evalN/A
*-rgt-identityN/A
distribute-rgt-out--N/A
*-commutativeN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
lower-134-z0z1z2z3z4N/A
lower--.f64N/A
lower-neg.f64100.0%
Applied rewrites100.0%
lift-134-z0z1z2z3z4N/A
lift-neg.f64N/A
fp-cancel-sign-subN/A
lift-*.f64N/A
+-commutativeN/A
*-rgt-identityN/A
fp-cancel-sign-sub-invN/A
*-lft-identityN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
lower-134-z0z1z2z3z4N/A
lower--.f64100.0%
Applied rewrites100.0%
(FPCore (x y z)
:precision binary64
(*
(copysign 1 x)
(if (<=
(fabs x)
2993155353253689/2993155353253689176481146537402947624255349848014848)
(- (fabs x) (* (* (- 1 y) (fabs x)) z))
(- (fabs x) (* (* z (- 1 y)) (fabs x))))))double code(double x, double y, double z) {
double tmp;
if (fabs(x) <= 1e-36) {
tmp = fabs(x) - (((1.0 - y) * fabs(x)) * z);
} else {
tmp = fabs(x) - ((z * (1.0 - y)) * fabs(x));
}
return copysign(1.0, x) * tmp;
}
public static double code(double x, double y, double z) {
double tmp;
if (Math.abs(x) <= 1e-36) {
tmp = Math.abs(x) - (((1.0 - y) * Math.abs(x)) * z);
} else {
tmp = Math.abs(x) - ((z * (1.0 - y)) * Math.abs(x));
}
return Math.copySign(1.0, x) * tmp;
}
def code(x, y, z): tmp = 0 if math.fabs(x) <= 1e-36: tmp = math.fabs(x) - (((1.0 - y) * math.fabs(x)) * z) else: tmp = math.fabs(x) - ((z * (1.0 - y)) * math.fabs(x)) return math.copysign(1.0, x) * tmp
function code(x, y, z) tmp = 0.0 if (abs(x) <= 1e-36) tmp = Float64(abs(x) - Float64(Float64(Float64(1.0 - y) * abs(x)) * z)); else tmp = Float64(abs(x) - Float64(Float64(z * Float64(1.0 - y)) * abs(x))); end return Float64(copysign(1.0, x) * tmp) end
function tmp_2 = code(x, y, z) tmp = 0.0; if (abs(x) <= 1e-36) tmp = abs(x) - (((1.0 - y) * abs(x)) * z); else tmp = abs(x) - ((z * (1.0 - y)) * abs(x)); end tmp_2 = (sign(x) * abs(1.0)) * tmp; end
code[x_, y_, z_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 2993155353253689/2993155353253689176481146537402947624255349848014848], N[(N[Abs[x], $MachinePrecision] - N[(N[(N[(1 - y), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[Abs[x], $MachinePrecision] - N[(N[(z * N[(1 - y), $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|x\right| \leq \frac{2993155353253689}{2993155353253689176481146537402947624255349848014848}:\\
\;\;\;\;\left|x\right| - \left(\left(1 - y\right) \cdot \left|x\right|\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left|x\right| - \left(z \cdot \left(1 - y\right)\right) \cdot \left|x\right|\\
\end{array}
if x < 9.9999999999999994e-37Initial program 95.8%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
add-flipN/A
remove-double-negN/A
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
distribute-rgt1-inN/A
*-commutativeN/A
associate--r+N/A
*-commutativeN/A
metadata-evalN/A
*-rgt-identityN/A
distribute-rgt-out--N/A
*-commutativeN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
lower-134-z0z1z2z3z4N/A
lower--.f64N/A
lower-neg.f64100.0%
Applied rewrites100.0%
lift-134-z0z1z2z3z4N/A
lift-neg.f64N/A
fp-cancel-sign-subN/A
*-lft-identityN/A
lift--.f64N/A
lift-*.f64N/A
associate--r-N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-inN/A
fp-cancel-sign-sub-invN/A
*-lft-identityN/A
lower--.f64N/A
Applied rewrites95.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6496.2%
Applied rewrites96.2%
if 9.9999999999999994e-37 < x Initial program 95.8%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-rgt-neg-outN/A
sub-flip-reverseN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6495.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6495.8%
Applied rewrites95.8%
(FPCore (x y z) :precision binary64 (- x (* (- 1 y) (* z x))))
double code(double x, double y, double z) {
return x - ((1.0 - y) * (z * 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x - ((1.0d0 - y) * (z * x))
end function
public static double code(double x, double y, double z) {
return x - ((1.0 - y) * (z * x));
}
def code(x, y, z): return x - ((1.0 - y) * (z * x))
function code(x, y, z) return Float64(x - Float64(Float64(1.0 - y) * Float64(z * x))) end
function tmp = code(x, y, z) tmp = x - ((1.0 - y) * (z * x)); end
code[x_, y_, z_] := N[(x - N[(N[(1 - y), $MachinePrecision] * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x - \left(1 - y\right) \cdot \left(z \cdot x\right)
Initial program 95.8%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
add-flipN/A
remove-double-negN/A
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
distribute-rgt1-inN/A
*-commutativeN/A
associate--r+N/A
*-commutativeN/A
metadata-evalN/A
*-rgt-identityN/A
distribute-rgt-out--N/A
*-commutativeN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
lower-134-z0z1z2z3z4N/A
lower--.f64N/A
lower-neg.f64100.0%
Applied rewrites100.0%
lift-134-z0z1z2z3z4N/A
lift-neg.f64N/A
fp-cancel-sign-subN/A
*-lft-identityN/A
lift--.f64N/A
lift-*.f64N/A
associate--r-N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-inN/A
fp-cancel-sign-sub-invN/A
*-lft-identityN/A
lower--.f64N/A
Applied rewrites95.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6498.0%
Applied rewrites98.0%
(FPCore (x y z) :precision binary64 (- x (* (* z (- 1 y)) x)))
double code(double x, double y, double z) {
return x - ((z * (1.0 - y)) * 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x - ((z * (1.0d0 - y)) * x)
end function
public static double code(double x, double y, double z) {
return x - ((z * (1.0 - y)) * x);
}
def code(x, y, z): return x - ((z * (1.0 - y)) * x)
function code(x, y, z) return Float64(x - Float64(Float64(z * Float64(1.0 - y)) * x)) end
function tmp = code(x, y, z) tmp = x - ((z * (1.0 - y)) * x); end
code[x_, y_, z_] := N[(x - N[(N[(z * N[(1 - y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]
x - \left(z \cdot \left(1 - y\right)\right) \cdot x
Initial program 95.8%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-rgt-neg-outN/A
sub-flip-reverseN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6495.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6495.8%
Applied rewrites95.8%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (- (* z y) -1) x))) (if (<= (- 1 y) -500000) t_0 (if (<= (- 1 y) 2) (- x (* z x)) t_0))))
double code(double x, double y, double z) {
double t_0 = ((z * y) - -1.0) * x;
double tmp;
if ((1.0 - y) <= -500000.0) {
tmp = t_0;
} else if ((1.0 - y) <= 2.0) {
tmp = x - (z * x);
} else {
tmp = t_0;
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((z * y) - (-1.0d0)) * x
if ((1.0d0 - y) <= (-500000.0d0)) then
tmp = t_0
else if ((1.0d0 - y) <= 2.0d0) then
tmp = x - (z * x)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((z * y) - -1.0) * x;
double tmp;
if ((1.0 - y) <= -500000.0) {
tmp = t_0;
} else if ((1.0 - y) <= 2.0) {
tmp = x - (z * x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((z * y) - -1.0) * x tmp = 0 if (1.0 - y) <= -500000.0: tmp = t_0 elif (1.0 - y) <= 2.0: tmp = x - (z * x) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(z * y) - -1.0) * x) tmp = 0.0 if (Float64(1.0 - y) <= -500000.0) tmp = t_0; elseif (Float64(1.0 - y) <= 2.0) tmp = Float64(x - Float64(z * x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((z * y) - -1.0) * x; tmp = 0.0; if ((1.0 - y) <= -500000.0) tmp = t_0; elseif ((1.0 - y) <= 2.0) tmp = x - (z * x); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(z * y), $MachinePrecision] - -1), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[N[(1 - y), $MachinePrecision], -500000], t$95$0, If[LessEqual[N[(1 - y), $MachinePrecision], 2], N[(x - N[(z * x), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
t_0 := \left(z \cdot y - -1\right) \cdot x\\
\mathbf{if}\;1 - y \leq -500000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;1 - y \leq 2:\\
\;\;\;\;x - z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if (-.f64 #s(literal 1 binary64) y) < -5e5 or 2 < (-.f64 #s(literal 1 binary64) y) Initial program 95.8%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
add-flipN/A
remove-double-negN/A
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
distribute-rgt1-inN/A
*-commutativeN/A
associate--r+N/A
*-commutativeN/A
metadata-evalN/A
*-rgt-identityN/A
distribute-rgt-out--N/A
*-commutativeN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
lower-134-z0z1z2z3z4N/A
lower--.f64N/A
lower-neg.f64100.0%
Applied rewrites100.0%
lift-134-z0z1z2z3z4N/A
lift-neg.f64N/A
fp-cancel-sign-subN/A
lift-*.f64N/A
+-commutativeN/A
*-rgt-identityN/A
fp-cancel-sign-sub-invN/A
*-lft-identityN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
lower-134-z0z1z2z3z4N/A
lower--.f64100.0%
Applied rewrites100.0%
Taylor expanded in z around 0
Applied rewrites76.1%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-rgt-identity71.9%
Applied rewrites71.9%
if -5e5 < (-.f64 #s(literal 1 binary64) y) < 2Initial program 95.8%
Taylor expanded in y around 0
Applied rewrites65.6%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-inN/A
fp-cancel-sub-signN/A
*-lft-identityN/A
lower--.f64N/A
lower-*.f6465.6%
Applied rewrites65.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- 1 y) z)))
(if (<= t_0 -10000000000000)
(* x (- (* y z) z))
(if (<= t_0 10000000) (- x (* z x)) (* x (* z (- y 1)))))))double code(double x, double y, double z) {
double t_0 = (1.0 - y) * z;
double tmp;
if (t_0 <= -10000000000000.0) {
tmp = x * ((y * z) - z);
} else if (t_0 <= 10000000.0) {
tmp = x - (z * x);
} else {
tmp = x * (z * (y - 1.0));
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 - y) * z
if (t_0 <= (-10000000000000.0d0)) then
tmp = x * ((y * z) - z)
else if (t_0 <= 10000000.0d0) then
tmp = x - (z * x)
else
tmp = x * (z * (y - 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (1.0 - y) * z;
double tmp;
if (t_0 <= -10000000000000.0) {
tmp = x * ((y * z) - z);
} else if (t_0 <= 10000000.0) {
tmp = x - (z * x);
} else {
tmp = x * (z * (y - 1.0));
}
return tmp;
}
def code(x, y, z): t_0 = (1.0 - y) * z tmp = 0 if t_0 <= -10000000000000.0: tmp = x * ((y * z) - z) elif t_0 <= 10000000.0: tmp = x - (z * x) else: tmp = x * (z * (y - 1.0)) return tmp
function code(x, y, z) t_0 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (t_0 <= -10000000000000.0) tmp = Float64(x * Float64(Float64(y * z) - z)); elseif (t_0 <= 10000000.0) tmp = Float64(x - Float64(z * x)); else tmp = Float64(x * Float64(z * Float64(y - 1.0))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (1.0 - y) * z; tmp = 0.0; if (t_0 <= -10000000000000.0) tmp = x * ((y * z) - z); elseif (t_0 <= 10000000.0) tmp = x - (z * x); else tmp = x * (z * (y - 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(1 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -10000000000000], N[(x * N[(N[(y * z), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 10000000], N[(x - N[(z * x), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * N[(y - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;t\_0 \leq -10000000000000:\\
\;\;\;\;x \cdot \left(y \cdot z - z\right)\\
\mathbf{elif}\;t\_0 \leq 10000000:\\
\;\;\;\;x - z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(y - 1\right)\right)\\
\end{array}
if (*.f64 (-.f64 #s(literal 1 binary64) y) z) < -1e13Initial program 95.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6458.8%
Applied rewrites58.8%
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
sub-flipN/A
+-commutativeN/A
lift-neg.f64N/A
distribute-lft1-inN/A
distribute-lft-neg-inN/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
remove-double-negN/A
lift-neg.f64N/A
sub-flipN/A
lower--.f6458.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6458.8%
Applied rewrites58.8%
if -1e13 < (*.f64 (-.f64 #s(literal 1 binary64) y) z) < 1e7Initial program 95.8%
Taylor expanded in y around 0
Applied rewrites65.6%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-inN/A
fp-cancel-sub-signN/A
*-lft-identityN/A
lower--.f64N/A
lower-*.f6465.6%
Applied rewrites65.6%
if 1e7 < (*.f64 (-.f64 #s(literal 1 binary64) y) z) Initial program 95.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6458.8%
Applied rewrites58.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- 1 y) z)) (t_1 (* x (* z (- y 1)))))
(if (<= t_0 -10000000000000)
t_1
(if (<= t_0 10000000) (- x (* z x)) t_1))))double code(double x, double y, double z) {
double t_0 = (1.0 - y) * z;
double t_1 = x * (z * (y - 1.0));
double tmp;
if (t_0 <= -10000000000000.0) {
tmp = t_1;
} else if (t_0 <= 10000000.0) {
tmp = x - (z * 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (1.0d0 - y) * z
t_1 = x * (z * (y - 1.0d0))
if (t_0 <= (-10000000000000.0d0)) then
tmp = t_1
else if (t_0 <= 10000000.0d0) then
tmp = x - (z * x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (1.0 - y) * z;
double t_1 = x * (z * (y - 1.0));
double tmp;
if (t_0 <= -10000000000000.0) {
tmp = t_1;
} else if (t_0 <= 10000000.0) {
tmp = x - (z * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = (1.0 - y) * z t_1 = x * (z * (y - 1.0)) tmp = 0 if t_0 <= -10000000000000.0: tmp = t_1 elif t_0 <= 10000000.0: tmp = x - (z * x) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(1.0 - y) * z) t_1 = Float64(x * Float64(z * Float64(y - 1.0))) tmp = 0.0 if (t_0 <= -10000000000000.0) tmp = t_1; elseif (t_0 <= 10000000.0) tmp = Float64(x - Float64(z * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (1.0 - y) * z; t_1 = x * (z * (y - 1.0)); tmp = 0.0; if (t_0 <= -10000000000000.0) tmp = t_1; elseif (t_0 <= 10000000.0) tmp = x - (z * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(1 - y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * N[(y - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -10000000000000], t$95$1, If[LessEqual[t$95$0, 10000000], N[(x - N[(z * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_0 := \left(1 - y\right) \cdot z\\
t_1 := x \cdot \left(z \cdot \left(y - 1\right)\right)\\
\mathbf{if}\;t\_0 \leq -10000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 10000000:\\
\;\;\;\;x - z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (-.f64 #s(literal 1 binary64) y) z) < -1e13 or 1e7 < (*.f64 (-.f64 #s(literal 1 binary64) y) z) Initial program 95.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6458.8%
Applied rewrites58.8%
if -1e13 < (*.f64 (-.f64 #s(literal 1 binary64) y) z) < 1e7Initial program 95.8%
Taylor expanded in y around 0
Applied rewrites65.6%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-inN/A
fp-cancel-sub-signN/A
*-lft-identityN/A
lower--.f64N/A
lower-*.f6465.6%
Applied rewrites65.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* y z))))
(if (<= y -120)
t_0
(if (<=
y
390000000000000010675228509652406409031340986106673798883456666958898901774965245340549120)
(- x (* z x))
t_0))))double code(double x, double y, double z) {
double t_0 = x * (y * z);
double tmp;
if (y <= -120.0) {
tmp = t_0;
} else if (y <= 3.9e+89) {
tmp = x - (z * x);
} else {
tmp = t_0;
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (y * z)
if (y <= (-120.0d0)) then
tmp = t_0
else if (y <= 3.9d+89) then
tmp = x - (z * x)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y * z);
double tmp;
if (y <= -120.0) {
tmp = t_0;
} else if (y <= 3.9e+89) {
tmp = x - (z * x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y * z) tmp = 0 if y <= -120.0: tmp = t_0 elif y <= 3.9e+89: tmp = x - (z * x) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y * z)) tmp = 0.0 if (y <= -120.0) tmp = t_0; elseif (y <= 3.9e+89) tmp = Float64(x - Float64(z * x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y * z); tmp = 0.0; if (y <= -120.0) tmp = t_0; elseif (y <= 3.9e+89) tmp = x - (z * x); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -120], t$95$0, If[LessEqual[y, 390000000000000010675228509652406409031340986106673798883456666958898901774965245340549120], N[(x - N[(z * x), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
t_0 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;y \leq -120:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 390000000000000010675228509652406409031340986106673798883456666958898901774965245340549120:\\
\;\;\;\;x - z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if y < -120 or 3.9000000000000001e89 < y Initial program 95.8%
Taylor expanded in y around inf
lower-*.f6435.8%
Applied rewrites35.8%
if -120 < y < 3.9000000000000001e89Initial program 95.8%
Taylor expanded in y around 0
Applied rewrites65.6%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-inN/A
fp-cancel-sub-signN/A
*-lft-identityN/A
lower--.f64N/A
lower-*.f6465.6%
Applied rewrites65.6%
(FPCore (x y z) :precision binary64 (- x (* z x)))
double code(double x, double y, double z) {
return x - (z * 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x - (z * x)
end function
public static double code(double x, double y, double z) {
return x - (z * x);
}
def code(x, y, z): return x - (z * x)
function code(x, y, z) return Float64(x - Float64(z * x)) end
function tmp = code(x, y, z) tmp = x - (z * x); end
code[x_, y_, z_] := N[(x - N[(z * x), $MachinePrecision]), $MachinePrecision]
x - z \cdot x
Initial program 95.8%
Taylor expanded in y around 0
Applied rewrites65.6%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-inN/A
fp-cancel-sub-signN/A
*-lft-identityN/A
lower--.f64N/A
lower-*.f6465.6%
Applied rewrites65.6%
(FPCore (x y z) :precision binary64 (* x (- 1 z)))
double code(double x, double y, double z) {
return x * (1.0 - z);
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (1.0d0 - z)
end function
public static double code(double x, double y, double z) {
return x * (1.0 - z);
}
def code(x, y, z): return x * (1.0 - z)
function code(x, y, z) return Float64(x * Float64(1.0 - z)) end
function tmp = code(x, y, z) tmp = x * (1.0 - z); end
code[x_, y_, z_] := N[(x * N[(1 - z), $MachinePrecision]), $MachinePrecision]
x \cdot \left(1 - z\right)
Initial program 95.8%
Taylor expanded in y around 0
Applied rewrites65.6%
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, J"
:precision binary64
(* x (- 1 (* (- 1 y) z))))