<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/faster-asin-was-hiding-in-plain-sight-81gpgy6la" -->

---
title: Faster asin() Was Hiding In Plain Sight | daily.dev
description: A developer working on a ray tracer (PSRayTracing) tried to speed up std::asin() calls using Padé Approximants, only to discover that a branchless minimax...
canonical: https://daily.dev/posts/faster-asin-was-hiding-in-plain-sight-81gpgy6la
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Faster asin() Was Hiding In Plain Sight | daily.dev
og:description: A developer working on a ray tracer (PSRayTracing) tried to speed up std::asin() calls using Padé Approximants, only to discover that a branchless minimax...
og:url: https://daily.dev/posts/faster-asin-was-hiding-in-plain-sight-81gpgy6la
og:image: https://api.daily.dev/og/posts/81gPgY6LA.png
og:image:alt: Faster asin() Was Hiding In Plain Sight
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Faster asin() Was Hiding In Plain Sight

**[Hacker News](https://daily.dev/sources/hn)** · 13 min read · 1 upvotes · 0 comments

## Summary

A developer working on a ray tracer (PSRayTracing) tried to speed up std::asin() calls using Padé Approximants, only to discover that a branchless minimax polynomial approximation from Nvidia's old Cg Toolkit documentation (based on Abramowitz and Stegun formula 4.4.45) already existed and outperformed everything else. The Cg-based asin() is 1.5–1.9x faster on Intel hardware and measurably faster on Apple M4. The key lesson: search for existing solutions before reinventing the wheel. The formula was hiding in docs for dead software, originally from a 1960s math textbook, and an LLM prompt surfaced it instantly.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://16bpp.net/blog/post/faster-asin-was-hiding-in-plain-sight/>

## Similar posts on daily.dev

- [Even Faster asin\(\) Was Staring Right At Me](https://daily.dev/posts/even-faster-asin-was-staring-right-at-me-tvqgiq3e0) · Hacker News · 0 upvotes · 0 comments
- [The “Most Hated” CSS Feature: asin\(\), acos\(\), atan\(\) and atan2\(\)](https://daily.dev/posts/the-most-hated-css-feature-asin-acos-atan-and-atan2--zbn43uros) · CSS-Tricks · 4 upvotes · 0 comments
- [The GNU libc atanh is correctly rounded](https://daily.dev/posts/the-gnu-libc-atanh-is-correctly-rounded-nmwprz0lc) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#c++](https://daily.dev/tags/c++), [#game-development](https://daily.dev/tags/game-development), [#graphics-programming](https://daily.dev/tags/graphics-programming), [#performance](https://daily.dev/tags/performance)

[View this post on daily.dev](https://daily.dev/posts/faster-asin-was-hiding-in-plain-sight-81gpgy6la)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Faster asin() Was Hiding In Plain Sight","url":"https://daily.dev/posts/faster-asin-was-hiding-in-plain-sight-81gpgy6la","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/faster-asin-was-hiding-in-plain-sight-81gpgy6la"},"datePublished":"2026-03-11T16:17:50.493Z","dateModified":"2026-03-15T03:36:10.444Z","description":"A developer working on a ray tracer (PSRayTracing) tried to speed up std::asin() calls using Padé Approximants, only to discover that a branchless minimax...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b6f47ae08610f1178b14949d77cfe4ff?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b6f47ae08610f1178b14949d77cfe4ff?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/faster-asin-was-hiding-in-plain-sight-81gpgy6la","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c++,game-development,graphics-programming,performance","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Faster asin() Was Hiding In Plain Sight"}]}
```

