Skip to content

Releases: ordo-one/FixedPoint

2.1.0

07 Apr 09:45
24c0e63

Choose a tag to compare

2.1.0 (2026-04-07)

What's Changed

  • chore(minor): Address Swift Forums feedback: NaN docs, minimum/maximum, external test suites by @hassila in #6

Full Changelog: 2.0.1...2.1.0

2.0.1

30 Mar 09:20
286b753

Choose a tag to compare

What's Changed

  • chore: Update README.md by @hassila in #4
  • docs(patch): fix stale NaN semantics documentation after signalling change by @hassila in #5

Full Changelog: 2.0.0...2.0.1

2.0.0

27 Mar 13:09
786e963

Choose a tag to compare

2.0.0 (2026-03-27)

Features

  • major: Make NaN signalling (trap on use) (#2) (786e963)

1.0.1

27 Mar 10:41
f33510e

Choose a tag to compare

1.0.1 (2026-03-27)

Performance Improvements

  • O(1) fast path for pow(10, n) via lookup table (3857a8e)
  • patch: O(1) fast path for pow(10, n) via lookup table (f33510e)

1.0.0

27 Mar 10:09

Choose a tag to compare

FixedPointDecimal 1.0.0 (2026-03-27)

Initial public release of FixedPointDecimal — a high-performance fixed-point decimal type for Swift, designed for financial systems where exact decimal representation is required and Foundation.Decimal is too slow.

Highlights

  • @frozen struct backed by Int64 with exactly 8 fractional decimal digits (value x 10^8)
  • 79x–943x faster than Foundation.Decimal across all arithmetic and comparison operations
  • Zero heap allocations for all operations — no jitter in latency-sensitive paths
  • 8 bytes in-memory and on the wire (vs 20 for Decimal)
  • Banker's rounding (round half to even) as the canonical policy across all entry points: string parsing, Double conversion,
    Decimal conversion, and arithmetic
  • Safe by default — trapping arithmetic matching Swift Int, with wrapping (&+, &-, &*) and overflow-reporting variants

Platform Support

Swift 6.2+, macOS 15+, iOS 18+, tvOS 18+, watchOS 11+, visionOS 2+, Linux

Protocol Conformances

Sendable, BitwiseCopyable, AtomicRepresentable, Equatable, Hashable, Comparable, Numeric, SignedNumeric,
Strideable, Codable, LosslessStringConvertible, ExpressibleByIntegerLiteral, ExpressibleByFloatLiteral, VectorArithmetic (SwiftUI), Plottable (Charts), FormatStyle, ParseableFormatStyle

Getting Started

  dependencies: [
      .package(url: "https://github.com/ordo-one/FixedPoint.git", from: "1.0.0"),
  ]                                                                                                                                    
   
  let price: FixedPointDecimal = 123.45                                                                                                
  let quantity: FixedPointDecimal = 1000
  let notional = price * quantity  // 123450
                                                                                                                                      

Full https://swiftpackageindex.com/ordo-one/FixedPoint/documentation on Swift Package Index.