Implementing the Transcendental Functions in Ivy

Coder adds fancy math to Ivy—name fight and pedant wars ignite

TLDR: A veteran coder added high‑precision sine and cosine to Ivy, his APL‑inspired mini language in Go. Readers split between kudos, an Emacs-fueled name dispute, a “you can only approximate” math nitpick battle, and jokes about the project living on creaky Blogspot—proof that comments can overshadow the code itself.

A longtime Go coder just showed how he got sine and cosine working with super-precise numbers in his tiny APL-style language, Ivy. Think math nerd nostalgia with a twist: Ivy favors exact numbers, slick array tricks, and even evaluates right‑to‑left—yes, really. He says Ivy even helped inspire work on how to print floating-point numbers, and it once powered an early Go mobile app. Translation for non‑devs: he dusted off an old-school calculator brain and made it do new-school magic.

But the comments? Absolute theater. One reader clapped with “Super interesting,” while another kicked off a naming brawl: “You can’t call it Ivy, that’s an Emacs package!” Suddenly it’s Emacs vs. Everyone, with branding police patrolling the thread. Then the resident philosopher arrives to declare a cosmic truth: you can’t truly “implement” transcendental functions—only approximate them. Cue eye-rolls and a chorus of “ship it anyway.” And just when the math talk heats up, someone yells the funniest line of the day: “Damn, Blogspot still exists!” The blog’s creaky phone layout becomes a meme—Blogspot: relic or vibe?

In short, the code is brainy, but the crowd is chaotic: pedants parsing definitions, Emacs diehards guarding the name, and nostalgics gawking at Blogspot. For a quiet math post, Ivy just lit up the comments like a group chat after midnight.

Key Points

  • Ivy is a pseudo‑APL language started in late 2014 and implemented in Go.
  • The addition of high‑precision floating‑point in Go prompted implementing transcendental functions like sine and cosine at higher precision.
  • Ivy uses ASCII tokens and exact arithmetic (big integers and rationals), enabling precise computations (e.g., 100! and cryptographic calculations).
  • Hana Kim and David Crawshaw helped make Ivy the first mobile application written in Go, with iOS and Android versions.
  • Ivy adopts APL semantics: unary/binary operators, array-aware operations, and right-to-left expression evaluation; fluid typing posed technical challenges.

Hottest takes

"You can't call it Ivy!" — presz
"By definition, they can not be implemented" — measurablefunc
"Damn, blogspot still exists!" — HeavyStorm
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.