DevOTechS Forums
October 14, 2024, 03:16:01 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: DevOTechS forums
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: NUMS Features  (Read 18339 times)
PeterM
Newbie
*
Posts: 2


View Profile
« on: September 23, 2008, 02:31:35 PM »

Hi

I was not aware you already had a Forum which is great.

Just a question regarding NUMS, can you give us a bit of a description of its capabilities
and what other features you are looking at implementing ?


PM
Logged
Admin
Administrator
Newbie
*****
Posts: 9



View Profile WWW
« Reply #1 on: September 23, 2008, 04:37:25 PM »

I was not aware you already had a Forum which is great.

Hi Peter,

Good to hear from you.
Yes, I set up the forums some time ago but I did not make much publicity about it.
Perhaps I should send all my customers a notification mail.
Anyway, glad you found it !  Smiley

Quote from: PeterM

Just a question regarding NUMS, ... its capabilities and what other features you are looking at implementing ?

NUMS is a mathematical library (a dll) I am developing now for arbitrary precision floating point and signed big integer calculations.
As you know, HIME has math functions for unsigned huge integers, but I got requests from users for adding floating point math functions.
Rather than to add such functionality in HIME, I chose to develop a new product, called NUMS.

NUMS is based on the same huge integer math kernel as HIME.
But NUMS can handle variables in 5 different data types: 4 numerical data types and a dynamic string data type:


1. "BinFloat", Binary base Arbitrary Precision Floating Point data type
This data type stores numbers in the format:

   mantissa * 256^exp

  • 'mantissa' is a signed binary number of which the maximum length can be determined by the user. It can be upto 2^31 (2147483648) bits long. That is the equivalent of 646 million decimal digits !
  • 'exp' is a binary number ranging from -2147483648 to +2147483647 ( -2^31 to 2^31 - 1)


2. "DecFloat", Decimal base Arbitrary Precision Floating Point data type
This data type stores numbers in the format:

   mantissa * 10^exp

This is a floating point number, simular to the BinFloat data type, except it is base 10.

  • 'mantissa' is a signed binary number of which the maximum length can be determined by the user. It can be upto 2^31 (2147483648) bits long.
  • 'exp' is a binary number ranging from -2147483648 to +2147483647 ( -2^31 to 2^31 - 1)


3. "Rational", rational number data type
This data type stores numbers in the format:

   nominator / denominator

  • 'nominator' is a signed binary huge integer number. It can be upto 2^31 (2147483648) bits long.
  • 'denominator' is an unsigned binary huge integer number. It can be upto 2^31 (2147483648) bits long.
So, a rational number consists (internally) always of 2 integer numbers.
 

4. "BigInt", big integer data type
This data type stores numbers in the format:

   big integer

  • 'big integer' is a signed binary huge integer number. It can be upto 2^31 (2147483648) bits long. That is the equivalent of 646 million decimal digits !


5. "String", string data type
This data type stores alphanumerical string data upto 2^31 (2147483648) bytes long.

 

PROS AND CONS OF THE VARIOUS DATA TYPES

BinFloat
+ Fast math operations
- Possibility for base conversion errors when converting to and from decimal (No base conversion errors when converting to and from hexadecimal or binary).

DecFloat
+ No base conversion errors when converting to and from decimal.
- A little more overhead during math operations compared to BinFloats.

Rational
+ No rounding errors for +, -, *, / 
- Generally, slower math operations compared to above data types.

BigInt
+ No rounding errors when used for integer operations.
- Only suitable for integer number math.

 
NUMS is still under development. Functions implemented so far are:
  • Basic math functions: +, -, *, /, e^x, LOG, x^2, square root, ABS, FIX (INT), FRAC
  • Boolean functions:  =, <>, >, >=, <, <=,  CMP, IsZero
  • Various functions to exchange data with NUMS
  • Support functions to convert numbers between the various data types, set precision, etc.

Functions that are in preparation and will be added to the first release:
  • x^y, LOG2, LOG10
  • Trigonometric functions: SIN, COS, TAN, ASIN, ACOS, ATAN, SINH, COSH, TANH, ASINH, ACOSH, ATANH
  • Pow, PowMod, Mod, ModInv for integers
  • Matrix calculation functions

If you like to know more, just ask.

Kind regards
Eddy

 

« Last Edit: September 23, 2008, 04:46:46 PM by Admin » Logged

www.devotechs.com
HIME - Huge Integer Math and Encryption Library
NUMS - Arbitrary Precision Floating Point Math library
PeterM
Newbie
*
Posts: 2


View Profile
« Reply #2 on: September 24, 2008, 10:18:33 AM »

Eddy

Wow, thanks for the info.



Peter
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!