-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
3 changed files
with
68 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//=----------------------------------------------------------------------------= | ||
// This source file is part of the Ultimathnum open source project. | ||
// | ||
// Copyright (c) 2023 Oscar Byström Ericsson | ||
// Licensed under Apache License, Version 2.0 | ||
// | ||
// See http://www.apache.org/licenses/LICENSE-2.0 for license information. | ||
//=----------------------------------------------------------------------------= | ||
|
||
//*============================================================================* | ||
// MARK: * Swift IEEE 754 | ||
//*============================================================================* | ||
|
||
public protocol SwiftIEEE754: Swift.BinaryFloatingPoint { | ||
|
||
//=------------------------------------------------------------------------= | ||
// MARK: Initializers | ||
//=------------------------------------------------------------------------= | ||
|
||
static func random(in range: Range<Self>, using randomness: inout some Swift.RandomNumberGenerator) -> Self | ||
static func random(in range: ClosedRange<Self>, using randomness: inout some Swift.RandomNumberGenerator) -> Self | ||
} | ||
|
||
//*============================================================================* | ||
// MARK: * Swift IEEE 754 x Models | ||
//*============================================================================* | ||
|
||
extension Float32: SwiftIEEE754 { } | ||
extension Float64: SwiftIEEE754 { } |
Oops, something went wrong.