Skip to content

Added hyperbolic numeric builtins.#28

Merged
schell merged 1 commit into
mainfrom
feat/numeric_builtin_hyperbolics
Dec 31, 2025
Merged

Added hyperbolic numeric builtins.#28
schell merged 1 commit into
mainfrom
feat/numeric_builtin_hyperbolics

Conversation

@schell

@schell schell commented Dec 31, 2025

Copy link
Copy Markdown
Owner

Fixes #14.

  1. Added 5 new trait/function pairs following the existing tanh pattern
  2. Each function has:
    • A trait (e.g., NumericBuiltinAcosh)
    • A free function (e.g., pub fn acosh<T: NumericBuiltinAcosh>(e: T) -> T)
    • Implementations for f32, Vec2f, Vec3f, Vec4f
  3. Added 5 sanity tests (sanity_acosh, sanity_asinh, sanity_atanh, sanity_cosh, sanity_sinh)
  4. Updated doc comment table to mark all 5 functions as implemented (x)

Copilot AI review requested due to automatic review settings December 31, 2025 01:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements 5 hyperbolic numeric builtin functions (acosh, asinh, atanh, cosh, sinh) following the existing WGSL specification, completing issue #14. Each function follows the established pattern in the codebase with trait definitions, free function wrappers, and implementations for both scalar f32 and vector types (Vec2f, Vec3f, Vec4f).

Key changes:

  • Added 5 new trait/function pairs for hyperbolic functions with full documentation
  • Implemented each function for scalar f32 and all vector types
  • Added sanity tests for all 5 functions
  • Updated the documentation table to mark these functions as implemented

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Fixes #14.

1. Added 5 new trait/function pairs following the existing `tanh` pattern
2. Each function has:
   - A trait (e.g., `NumericBuiltinAcosh`)
   - A free function (e.g., `pub fn acosh<T: NumericBuiltinAcosh>(e: T) -> T`)
   - Implementations for `f32`, `Vec2f`, `Vec3f`, `Vec4f`
3. Added 5 sanity tests (`sanity_acosh`, `sanity_asinh`, `sanity_atanh`, `sanity_cosh`, `sanity_sinh`)
4. Updated doc comment table to mark all 5 functions as implemented (`x`)
@schell schell force-pushed the feat/numeric_builtin_hyperbolics branch from 787fb0d to 4cc311d Compare December 31, 2025 19:37
@schell schell merged commit ee032f0 into main Dec 31, 2025
4 checks passed
schell added a commit that referenced this pull request May 29, 2026
Fixes #14.

1. Added 5 new trait/function pairs following the existing `tanh` pattern
2. Each function has:
   - A trait (e.g., `NumericBuiltinAcosh`)
   - A free function (e.g., `pub fn acosh<T: NumericBuiltinAcosh>(e: T) -> T`)
   - Implementations for `f32`, `Vec2f`, `Vec3f`, `Vec4f`
3. Added 5 sanity tests (`sanity_acosh`, `sanity_asinh`, `sanity_atanh`, `sanity_cosh`, `sanity_sinh`)
4. Updated doc comment table to mark all 5 functions as implemented (`x`)
@schell schell deleted the feat/numeric_builtin_hyperbolics branch June 1, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hyperbolic Builtin Functions (Priority 3)

2 participants