Resources For IT Professionals

# Overview

This article describes the ranges of parameters or return values for Small Basic Math functions.  This article is work in progress.  So "N/A" means that the range is not investigated yet.  Please edit this article if you know any range information about Math functions in Small Basic.
In this article floating point expression is used such as 7.9E28 that means 7.9 x 1028.

Basically, Microsoft Small Basic is one of .NET framework language.  So, internally double precision (64bit binary) floating point might be used.  Most of limit may come from double precision floating point.

# Math Functions

## +

number1 + number2

### Range

number1 + number2 ≦ 79228162514264337593543950335 = 7.9E28

JFW812

## -

number1 - number2

N/A

## *

number1 * number2

N/A

## /

number1 / number2

### Range

number1 ≧ 0.0000000000000000000000000001 (= 1E-28) while number2 = 10

GRS792

Math.Abs(number)

N/A

## ArcCos

Math.ArcCos(cosValue)

N/A

## ArcSin

Math.ArcSin(sinValue)

N/A

## ArcTan

Math.ArcTan(tanValue)

N/A

## Ceilinig

Math.Ceiling(number)

N/A

## Cos

Math.Cos(angle)

### Range

-1 ≦ Math.Cos(angle) ≦ 1

## Floor

Math.Floor(number)

N/A

## GetDegrees

Math.GetDegrees(angle)

N/A

## GetRadians

Math.GetRadians(angle)

N/A

## GetRandomNumber

Math.GetRandomNumber(maxNumber)

N/A

Math.Log(number)

N/A

## Max

Math.Max(number1, number2)

### Range

Number of significant digits is limited to the return value of Math.Max ​​function.

DVN723

## Min

Math.Min(number1, number2)

N/A

## NaturalLog

Math.NaturalLog(number)

N/A

## Power

Math.Power(baseNumber, exponent)

### Range

baseNumber ≦ 31622776 while exponent = 2

exponent ≦ 49 while baseNumber = 2

### Sample Program

FFW588 for Math.Power(31622776, 2)

## Remainder

Math.Remainder(dividend, divisor)

### Range

Math.Remainder(9007199254740992, 2)
9007199254740992 = 9E15

## Round

Math.Round(number)

N/A

## Sin

Math.Sin(angle)

### Range

-1 ≦ Math.Sin(angle) ≦ 1

## SquareRoot

Math.SquareRoot(number)

### Range

number ≦ 19807040628566084398385987584 = 1.9E28

Math.Tan(angle)

N/A

# See Also

Number ranges on Math functions - Small Basic (Small Basic Forum)
Smallest & largest Numbers that sb can handle (Small Basic Forum)
.NET Framework Double Structure (MSDN Library)

Sort by: Published Date | Most Recent | Most Useful
Comments
Page 1 of 1 (1 items)