imult64(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

hey bestie, from the Library Functions Manual, meet imult64(3) β€” integer multiplication with overflow checking. she's the responsible friend who checks the math before anything goes feral. ✨


✨ SYNTAX ✨

#include <libowfat/safemult.h>

int imult64(int64 a,int64 b,int64* c);

🌸 DESCRIPTION 🌸

okay so imult64 does c=a*b, and then it returns 1. that's the whole main character move. πŸ’…

but if there's an integer overflow? not on her watch. imult64 leaves c alone and returns 0. so c stays exactly how it was, no cap. 🫢

overflow check said: nope, we're not touching c, and we're returning 0. periodt. πŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹


cute sign-off: from the Library Functions Manual, page imult64(3) β€” no date on this one, but she's timeless, fr fr. πŸ’–βœ¨