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:
@@ -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.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user