log10(3)

πŸ’– log10(3) β€” bestie edition πŸ’–

Okay so bestie, welcome to the log10 manual page from the Library Functions Manual β€” she's serving base-10 logarithm realness and honestly? Iconic. Lowkey the whole family is here: log10, log10f, and log10l πŸ’…


✨ NAME ✨

log10, log10f, log10l β€” the base-10 logarithmic function, aka the way that you find out what power of ten gives you x. No cap. πŸŽ€


πŸ“š LIBRARY πŸ“š

Math library (libm, -lm) β€” so like, remember to link her or she will not show up. Fr fr. 🫢


🌸 SYNOPSIS 🌸

#include <math.h>

double log10(double x);
float log10f(float x);
long double log10l(long double x);

🧚 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

Bestie, if you want log10f() and log10l() to even exist for you, you gotta unlock them with one of these ✨

log10f(), log10l():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
Like a vibe check but for the preprocessor. She will absolutely gatekeep you if you don't set these. πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

These functions return the base-10 logarithm of x. That's it, that's the whole thing. Simple. Elegant. Main character energy. πŸ‘‘


πŸ’œ RETURN VALUE πŸ’œ

On success, these functions return the base-10 logarithm of x. Slay. ✨

But for the special cases β€” and yes bestie that includes where x is 0, 1, negative, infinity, or NaN β€” go peek at log(3). She has the tea. β˜•


😭 ERRORS 😭

Wanna know if an error even happened when you called these? Go read math_error(7), she explains how to check. πŸ”

And for the whole discussion of what errors can occur for these functions, see log(3). Nothing messy happens here that isn't already log's problem, ngl.


πŸ’… ATTRIBUTES πŸ’…

For an explanation of the terms used in this section, see attributes(7).

  • Interface: log10(), log10f(), log10l()
    • Attribute: Thread safety
    • Value: MT-Safe
MT-Safe meaning she's safe to use across threads β€” no drama, no chaos, just vibes. 🌈

🌟 STANDARDS 🌟

C11, POSIX.1-2008. Certified. Periodt. πŸ’–


πŸŽ€ HISTORY πŸŽ€

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89. She's been around, bestie β€” a true legend of the game, aging like fine wine. πŸ“


πŸ‘‘ SEE ALSO πŸ‘‘

The whole logarithm friend group honestly. Go say hi. πŸ¦‹

And that's the page, bestie!! This little masterpiece is from Linux man-pages 6.20, dated 2026-02-08, and she ate and left absolutely no crumbs πŸ’…βœ¨πŸŒΈπŸ’–

πŸ“¦ 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms