(FPCore (x y z) :precision binary64 (/ (- x y) (- z y)))
↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (- x y) z)) (t_1 (- 1.0 (/ x y))))
(if (<= z -2.5633821233555645e+161)
t_0
(if (<= z -6.691893663159368e+81)
(/ (- y) (- z y))
(if (<= z -1.1211066976904637e+24)
t_0
(if (<= z -9.090310035652928e-83)
t_1
(if (<= z -1.7106545863538735e-156)
(/ x (- z y))
(if (<= z 2.33673782400799e-29) t_1 (- (/ x z) (/ y z))))))))))
double code(double x, double y, double z) {
return (x - y) / (z - y);
}
↓
double code(double x, double y, double z) {
double t_0 = (x - y) / z;
double t_1 = 1.0 - (x / y);
double tmp;
if (z <= -2.5633821233555645e+161) {
tmp = t_0;
} else if (z <= -6.691893663159368e+81) {
tmp = -y / (z - y);
} else if (z <= -1.1211066976904637e+24) {
tmp = t_0;
} else if (z <= -9.090310035652928e-83) {
tmp = t_1;
} else if (z <= -1.7106545863538735e-156) {
tmp = x / (z - y);
} else if (z <= 2.33673782400799e-29) {
tmp = t_1;
} else {
tmp = (x / z) - (y / z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x - y) / (z - y)
end function
↓
real(8) function code(x, y, z)
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 = (x - y) / z
t_1 = 1.0d0 - (x / y)
if (z <= (-2.5633821233555645d+161)) then
tmp = t_0
else if (z <= (-6.691893663159368d+81)) then
tmp = -y / (z - y)
else if (z <= (-1.1211066976904637d+24)) then
tmp = t_0
else if (z <= (-9.090310035652928d-83)) then
tmp = t_1
else if (z <= (-1.7106545863538735d-156)) then
tmp = x / (z - y)
else if (z <= 2.33673782400799d-29) then
tmp = t_1
else
tmp = (x / z) - (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return (x - y) / (z - y);
}
↓
public static double code(double x, double y, double z) {
double t_0 = (x - y) / z;
double t_1 = 1.0 - (x / y);
double tmp;
if (z <= -2.5633821233555645e+161) {
tmp = t_0;
} else if (z <= -6.691893663159368e+81) {
tmp = -y / (z - y);
} else if (z <= -1.1211066976904637e+24) {
tmp = t_0;
} else if (z <= -9.090310035652928e-83) {
tmp = t_1;
} else if (z <= -1.7106545863538735e-156) {
tmp = x / (z - y);
} else if (z <= 2.33673782400799e-29) {
tmp = t_1;
} else {
tmp = (x / z) - (y / z);
}
return tmp;
}
def code(x, y, z):
return (x - y) / (z - y)
↓
def code(x, y, z):
t_0 = (x - y) / z
t_1 = 1.0 - (x / y)
tmp = 0
if z <= -2.5633821233555645e+161:
tmp = t_0
elif z <= -6.691893663159368e+81:
tmp = -y / (z - y)
elif z <= -1.1211066976904637e+24:
tmp = t_0
elif z <= -9.090310035652928e-83:
tmp = t_1
elif z <= -1.7106545863538735e-156:
tmp = x / (z - y)
elif z <= 2.33673782400799e-29:
tmp = t_1
else:
tmp = (x / z) - (y / z)
return tmp
function code(x, y, z)
return Float64(Float64(x - y) / Float64(z - y))
end
↓
function code(x, y, z)
t_0 = Float64(Float64(x - y) / z)
t_1 = Float64(1.0 - Float64(x / y))
tmp = 0.0
if (z <= -2.5633821233555645e+161)
tmp = t_0;
elseif (z <= -6.691893663159368e+81)
tmp = Float64(Float64(-y) / Float64(z - y));
elseif (z <= -1.1211066976904637e+24)
tmp = t_0;
elseif (z <= -9.090310035652928e-83)
tmp = t_1;
elseif (z <= -1.7106545863538735e-156)
tmp = Float64(x / Float64(z - y));
elseif (z <= 2.33673782400799e-29)
tmp = t_1;
else
tmp = Float64(Float64(x / z) - Float64(y / z));
end
return tmp
end
function tmp = code(x, y, z)
tmp = (x - y) / (z - y);
end
↓
function tmp_2 = code(x, y, z)
t_0 = (x - y) / z;
t_1 = 1.0 - (x / y);
tmp = 0.0;
if (z <= -2.5633821233555645e+161)
tmp = t_0;
elseif (z <= -6.691893663159368e+81)
tmp = -y / (z - y);
elseif (z <= -1.1211066976904637e+24)
tmp = t_0;
elseif (z <= -9.090310035652928e-83)
tmp = t_1;
elseif (z <= -1.7106545863538735e-156)
tmp = x / (z - y);
elseif (z <= 2.33673782400799e-29)
tmp = t_1;
else
tmp = (x / z) - (y / z);
end
tmp_2 = tmp;
end
herbie shell --seed 2022228
(FPCore (x y z)
:name "Graphics.Rasterific.Shading:$sgradientColorAt from Rasterific-0.6.1"
:precision binary64
:herbie-target
(- (/ x (- z y)) (/ y (- z y)))
(/ (- x y) (- z y)))