exp10(3)
π exp10 β base-10 exponential function, aka "10 to the what now" π
okay bestie sit DOWN because we're in the Library Functions Manual today and the star of the show is exp10 (and its lil siblings exp10f and exp10l). it's giving math, it's giving libm, it's giving exponents but make it base 10 β¨
π LIBRARY
Math library, that's libm, so link it with -lm or nothing works and you'll be sad. π«Ά
β¨ SYNOPSIS β¨
first things first, you gotta unlock the secret menu. write this define before your includes, no cap:
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double exp10(double x);
float exp10f(float x);
long double exp10l(long double x);
three flavors, three types: the double one, the float one with an f on the end, and the big dramatic long double one with an l on the end. pick your fighter π
oh and the_GNU_SOURCEthing isn't optional-vibes, it's literally required to see these. yes it's a whole gatekeeping moment. yes you still have to do it. seefeature_test_macros(7)if you wanna understand why. π
πΈ DESCRIPTION πΈ
these functions return the value of 10 raised to the power of x.
that's it. that's the function. exp10(x) = 10<sup>x</sup>. it's lowkey the most straightforward glow-up in the whole math library π
π«Ά RETURN VALUE π«Ά
if everything goes right, congrats, you get the base-10 exponential value of x back. slay. β
for all the spicy special cases β we're talking infinity, NaN, overflows, underflows, the whole chaotic crew β you gotta go read exp(3). they didn't want to repeat themselves and honestly? respect. π₯
π ERRORS π
want to know if something went wrong while you were calling these? totally fair, that's a whole mood. head over to math_error(7) for the full rundown on how to detect errors when calling these functions.
and for the actual discussion of which errors can pop off here, again: see exp(3). the lore lives there. π
π ATTRIBUTES π
for an explanation of the terms used in this section (yes, the whole table exists so you can be informed), see attributes(7).
here's the tea, table-style but make it cute:
- Interface:
exp10(),exp10f(),exp10l() - Attribute: Thread safety
- Value:
MT-Safe
translation bestie: these are thread safe, so you can call them from multiple threads and nobody's gonna fight. iconic. π
π STANDARDS π
GNU. that's the standard. that's it. GNU. periodt. π
β HISTORY β
glibc 2.1. ancient in the best way. a real one. π¦
π BUGS π
okay listen, this one's a genuine historical oopsie so pay attention:
Before glibc 2.19, the glibc implementation of these functions did not seterrnotoERANGEwhen an underflow error occurred.
so if you're on old glibc and you're checking errno for ERANGE after an underflow, you'd get nothing and you'd be confused and you'd blame yourself. don't. it was the library. not you. π€
π§ SEE ALSO π§
go read them, they're all part of the same math-girlie cinematic universe πΈ
and that's the whole page bestie!! this was brought to you by Linux man-pages 6.20, dated 2026-02-08, and by the letter x being raised to the power of 10. no cap, go compute something beautiful. πβ¨π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 1993, David Metcalfe <david@prism.demon.co.uk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms