Skip to content

Commit

Permalink
Use the new primitive in the param real/imag abs
Browse files Browse the repository at this point in the history
---
Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
  • Loading branch information
mppf committed Jan 5, 2024
1 parent f00e1cc commit 387f361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/standard/AutoMath.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ module AutoMath {

/* Return the absolute value of a param real(64) as a param */
proc abs(param x: real(64)) param :real(64) {
return if x < 0 then -x else x;
return __primitive("abs", x);
}

/* Returns the magnitude of the real argument `x`. */
Expand All @@ -224,7 +224,7 @@ module AutoMath {

/* Return the absolute value of a param real(32) as a param */
proc abs(param x: real(32)) param : real(32) {
return if x < 0 then -x else x;
return __primitive("abs", x);
}

/* Returns the real magnitude of the imaginary argument `x`. */
Expand Down

0 comments on commit 387f361

Please sign in to comment.