abs()
Calculates the absolute value of the input.
Syntax
abs(
x)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
x | int, real, or timespan | ✔️ | The value to make absolute. |
Returns
Absolute value of x.
Example
print abs(-5)
Output
print_0 |
---|
5 |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for