hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit c3bc351abceefdde968a89471d91909cf1251353
parent 7a82c3bb7bb5451645b58436046d61354394234d
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sun,  5 Jun 2022 00:20:32 -0400

math: style fixes

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mmath/fenv+aarch64.ha | 2+-
Mmath/fenv+riscv64.ha | 2+-
Mmath/fenv+x86_64.ha | 2+-
Mmath/math.ha | 7+++++--
4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/math/fenv+aarch64.ha b/math/fenv+aarch64.ha @@ -15,7 +15,7 @@ // math::clearexcept(math::fexcept::ALL); // let a = 0.0/0.0; // let e = math::testexcept(math::fexcept::INVALID | math::fexcept::INEXACT); -export type fexcept = enum uint { +export type fexcept = enum uint { // No flags set NONE = 0, // Occurs when there is no well-defined result of an operation, such as diff --git a/math/fenv+riscv64.ha b/math/fenv+riscv64.ha @@ -16,7 +16,7 @@ // math::clearexcept(math::fexcept::ALL); // let a = 0.0/0.0; // let e = math::testexcept(math::fexcept::INVALID | math::fexcept::INEXACT); -export type fexcept = enum uint { +export type fexcept = enum uint { // No flags set NONE = 0, // Occurs when there is no well-defined result of an operation, such as diff --git a/math/fenv+x86_64.ha b/math/fenv+x86_64.ha @@ -15,7 +15,7 @@ // math::clearexcept(math::fexcept::ALL); // let a = 0.0/0.0; // let e = math::testexcept(math::fexcept::INVALID | math::fexcept::INEXACT); -export type fexcept = enum uint { +export type fexcept = enum uint { // No flags set NONE = 0, // Occurs when there is no well-defined result of an operation, such as diff --git a/math/math.ha b/math/math.ha @@ -73,8 +73,11 @@ export fn eqwithinf32(x: f32, y: f32, tol: f32) bool = { }; // Returns whether x and y are within tol of each other. -export fn eqwithin(x: types::floating, y: types::floating, - tol: types::floating) bool = { +export fn eqwithin( + x: types::floating, + y: types::floating, + tol: types::floating, +) bool = { match (x) { case let n: f64 => return eqwithinf64(n, y as f64, tol as f64);