Use fabs() (in math.h) to get absolute-value for double:

double d1 = fabs(-3.8951);
Answer from herohuyongtao on Stack Overflow
🌐
Linux Man Pages
man7.org › linux › man-pages › man3 › abs.3.html
abs(3) - Linux manual page
These functions compute the absolute value of the argument j of the appropriate integer type for the function.
🌐
TutorialsPoint
tutorialspoint.com › c_standard_library › c_function_abs.htm
C library - abs() function
#include<stdio.h> #include<stdlib.h> int main(){ int x = -2, res; printf("Original value of X is %d\n", x); // use the abs() function to get the absolute value res = abs(x); printf("Absolute value of X is %d", res); } ... Let's create another ...
🌐
Linux Man Pages
linux.die.net › man › 3 › abs
abs(3): compute absolute value of integer - Linux man page
Returns the absolute value of the integer argument, of the appropriate integer type for the function. SVr4, POSIX.1-2001, 4.3BSD, C99.
🌐
Wikipedia
en.wikipedia.org › wiki › Absorbing_Man
Absorbing Man - Wikipedia
2 weeks ago - Carl "Crusher" Creel was a boxer and jailed criminal who becomes the Absorbing Man when he drinks a liquid which the Asgardian god Loki laced with a mystical potion. Discovering that he could absorb the properties of anything he touched, Creel ...
🌐
Scaler
scaler.com › home › topics › abs() function in c
abs() Function in C - Scaler Topics
March 21, 2024 - Whatever integer value we pass into the absolute function abs(), the absolute value of that integer is the return value of abs() in C.
🌐
Cppreference
en.cppreference.com › w › cpp › numeric › math › abs
std::abs, std::labs, std::llabs, std::imaxabs - cppreference.com
March 14, 2025 - #include <climits> #include <cstdlib> #include <iostream> int main() { std::cout << std::showpos << "abs(+3) = " << std::abs(3) << '\n' << "abs(-3) = " << std::abs(-3) << '\n'; // std::cout << std::abs(INT_MIN); // undefined behavior on 2's complement systems }
Find elsewhere
🌐
W3Schools
w3schools.com › c › ref_stdlib_abs.php
C stdlib abs() Function
C Examples C Real-Life Examples C Exercises C Quiz C Code Challenges C Compiler C Syllabus C Study Plan C Interview Q&A C Certificate ... The abs() function returns the absolute (positive) value of a number.
🌐
Apple Developer
developer.apple.com › library › archive › documentation › System › Conceptual › ManPages_iPhoneOS › man3 › abs.3.html
Mac OS X Manual Page For abs(3)
This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles · For more information ...
🌐
GNU
gnu.org › s › libc › manual › html_node › Absolute-Value.html
Absolute Value (The GNU C Library)
Preliminary: | MT-Safe | AS-Safe | AC-Safe | See POSIX Safety Concepts. This function returns the absolute value of the floating-point number number.
🌐
C For Dummies
c-for-dummies.com › blog
The abs() Function | C For Dummies Blog
November 12, 2016 - For example, you subtract variable b from a, which returns the difference. The result could be positive or negative. To ensure that its positive, you use the abs() function:
🌐
SysTutorials
systutorials.com › docs › linux › man › 3p-abs
abs: return an integer absolute value - Linux Manuals (3p)
The abs() function shall compute the absolute value of its integer operand, i. If the result cannot be represented, the behavior is undefined. RETURN VALUE The abs()
🌐
Cplusplus
cplusplus.com › reference › cstdlib › abs
abs
The absolute value of n. In C, only the int version exists. For the long int equivalent see labs.
🌐
Men's Health
menshealth.com › fitness › abs for 2026 › 20 ab exercises that will help you carve a stronger core
Need a New Core Routine? These Are the Best Abs Exercises to Strengthen Your Six-Pack.
October 16, 2025 - These 20 ab exercises and workouts will strengthen your core, whether your ultimate goal is building a six-pack or just getting stronger.
🌐
Adobe Stock
stock.adobe.com › search
Abs Men Front Images – Browse 7,822 Stock Photos, Vectors, and Video | Adobe Stock
August 31, 2025 - Search from thousands of royalty-free Abs Men Front stock images and video for your next project. Download royalty-free stock photos, vectors, HD footage and more on Adobe Stock.
🌐
Muscle & Strength
muscleandstrength.com › exercises › abs
Abs Exercises: 150+ Free Video Exercise Guides | Muscle & Strength
Live Chat · 1-800-537-9910 · Ab exercises. Build impressive "6-pack abs" with these movements. View Exercise · View Exercise · View Exercise · Trending · What's New · Discussed · Name · Type Strength · Equipment Bodyweight · Mechanics Isolation · Exp. Level Beginner ·
🌐
Pinterest
pinterest.com › explore › health › body fitness › exercise routines › guy abs
Guy Abs
Abs Pics Man · Aesthetic Abs · V Line Men Muscle · V Line Abs · Abs On Males · Bicep Pose · Muscular Boys · Ideal Physique Men · Strong Men Reference · Broad Chest Men · Buff Man Aesthetic · Men Bodies · Buff Guy Aesthetic · Muscled Men · Bicep Pose ·
🌐
Fandom
marvel-contestofchampions.fandom.com › wiki › Absorbing_Man
Absorbing Man | Marvel Contest of Champions Wiki | Fandom
January 9, 2026 - Absorbing Man is a powerful brawler with the ability to transform himself into other substances, allowing him to turn his opponents’ strengths against them and hit them where they’re weakest.
🌐
Caliber Fitness
caliberstrong.com › home › blog › a guide to the best ab exercises for men
A Guide To The Best Ab Exercises For Men
August 26, 2021 - Here is a sample ab routine that you could follow: ... 3 sets of regular or hanging leg raises, for 10-12 reps (put a dumbbell between your feet to increase the resistance) 3 sets of the ab wheel, for as many reps as you can do