Skip to content

Conversation

@nberlette
Copy link
Owner

  • chore: move trig/const/rand tests to src dir
  • refactor(ieee754): abstract out common parts of float16/32/64 modules
  • refactor(float16): use ieee754 abstractions for float16
  • feat(float16): add float16/constants submodule
  • feat(float16): add float16/guards submodule
  • refactor(float32): use ieee754 abstractions for float32 ops
  • feat(float32): add float32/constants submodule
  • feat(float32): add float32/guards submodule

@nberlette nberlette added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 19, 2025
Copilot AI review requested due to automatic review settings July 19, 2025 15:02
@nberlette nberlette added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 19, 2025
Copy link
Contributor

Copilot AI left a comment

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 refactors the IEEE-754 floating-point implementation by extracting common functionality into a shared abstraction layer. The changes consolidate duplicate code between float16 and float32 modules while adding new constants and type guard submodules.

  • Introduces a shared IEEE-754 abstraction module to eliminate code duplication
  • Adds constants and guards submodules for both float16 and float32 formats
  • Moves test files from root to src directory for better organization

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/random.test.ts Updates import path to relative reference
src/internal/ieee754.ts New shared IEEE-754 encoding/decoding abstraction
src/float32/round.ts Minor comment formatting improvement
src/float32/mod.ts Adds exports for new constants and guards submodules
src/float32/guards.ts New type guard functions for float32 validation
src/float32/encode.ts Refactored to use shared IEEE-754 abstraction
src/float32/decode.ts Refactored to use shared IEEE-754 abstraction
src/float32/constants.ts New constants module for float32 format specifications
src/float16/mod.ts Adds exports for new constants and guards submodules
src/float16/guards.ts New type guard functions for float16 validation
src/float16/encode.ts Refactored to use shared IEEE-754 abstraction
src/float16/decode.ts Refactored to use shared IEEE-754 abstraction
src/float16/constants.ts New constants module for float16 format specifications
src/constants.test.ts Updates import path to relative reference

nberlette and others added 14 commits December 26, 2025 13:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
feat: add positive zero guards, constants, and types (#9)
@nberlette nberlette merged commit b8469a2 into main Jan 1, 2026
2 checks passed
@nberlette nberlette deleted the refactor-everything branch January 1, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants