CalcEngine: Remove the need to specify base/radix when working with Rational values (#31)

- Separates values from the representation (base/radix) of those values.
- Uses a single base for all values represented as Rationals.
- Rationals are converted to/from a specific base when they are converted to/from strings.
This commit is contained in:
Josh Koon
2019-02-22 10:00:19 -08:00
committed by GitHub
parent 47f9996fa9
commit 73372283a0
14 changed files with 146 additions and 145 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//---------------------------------------------------------------------------
@@ -347,6 +347,7 @@ PNUMBER numtonRadixx(_In_ PNUMBER a, uint32_t radix)
// mantissa a string representation of a number
// exponentIsNegative true if exponent is less than zero
// exponent a string representation of a number
// radix is the number base used in the source string
//
// RETURN: PRAT representation of string input.
// Or nullptr if no number scanned.

View File

@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//----------------------------------------------------------------------------