Skip to content

Commit

Permalink
#6737: Fix erfc
Browse files Browse the repository at this point in the history
  • Loading branch information
VirdhatchaniKN committed Apr 12, 2024
1 parent a57b5d5 commit b024557
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ inline void calculate_erfc() {
// SFPU microcode:
for (int d = 0; d < ITERATIONS; d++) {
vFloat x = dst_reg[0];
v_if(x < 0.0f) { x = 1.0 + (calculate_erf_body<APPROXIMATION_MODE>(x)); }
v_if(x < 0.0f) { x = -x; x = 1.0 + (calculate_erf_body<APPROXIMATION_MODE>(x)); }
v_else { x = 1.0 - (calculate_erf_body<APPROXIMATION_MODE>(x)); }
v_endif;
dst_reg[0] = x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ inline void calculate_erfc() {
// SFPU microcode:
for (int d = 0; d < 8; d++) {
vFloat x = dst_reg[0];
v_if(x < 0.0f) { x = 1.0 + (calculate_erf_body<APPROXIMATION_MODE>(x)); }
v_if(x < 0.0f) { x = -x; x = 1.0 + (calculate_erf_body<APPROXIMATION_MODE>(x)); }
v_else { x = 1.0 - (calculate_erf_body<APPROXIMATION_MODE>(x)); }
v_endif;
dst_reg[0] = x;
Expand Down

0 comments on commit b024557

Please sign in to comment.