How to use InfoFind's Calculator

Opening the Calculator Form

You can access the Calculator Form from the menu [Information]->[Calculator] or you can also access the Calculator Form the side panel on the left side of InfoFind under [Information]->[Calculator].

Using the Standard Calculator

A calculator is a handheld device or computer program that performs mathematical calculations such as addition, subtraction, multiplications, and division. In addition to basic calculations, calculators often have the ability to perform specialized tasks such as algebra, geometry, and trigonometry. InfoFind's calculator lets you use either the keyboard or the mouse to enter math expressions, and you can enter as many lines as you would like on the same screen. The calculator that comes with your computer only shows one number at a time, but you may want to see many numbers and math problems at the same time, so in cases like this, InfoFind's calculator is the perfect solution. To use the calculator type your math problems in the workspace or press the buttons on the right side of the screen. After you enter each line type the [Enter] key or press the [Calculate] button to see the answers in the results section below the workspace. To see a sample of how the calculator works click the [Show Samples] button on the right side of the form. InfoFind displays numbers and operators (+, -, *, /) in different colors to make viewing and printing look nice and easy to read. If you want to use the Windows calculator that comes with your computer you can do so by clicking the button [Windows Calc].

InfoFind's Calculator

Using the Scientific Calculator

The calculator that comes with InfoFind allows for very advanced calculations and custom functions. This is part of the scientific calculator. To view the calculator in this mode click on the [Scientific >>] button from the previous image. If you click [Show Samples] in this mode, you will see scientific samples. Operators are the two columns of buttons on the left, under the [Standard <<] button. The right three columns of buttons contains functions. The [Big Numbers] button takes you to the Big Number Calculator and the [Options] button takes you to the calculator options. Operators, Functions, Variables, Comments, and Results are all displayed in different colors to make reading the workspace and results easy to read on screen and on a printed page. The colors can be changed from the Calculator Options screen. Comments can be entered in the workspace by typing the ['] character in a line; the comment would then appear after the ['] character. You can see examples of this below or by pressing the [Show Samples] button while the calculator is in scientific mode.

InfoFind's Scientific Calculator

Variables and Functions

The scientific calculator allows for variables and custom functions. These can be entered on the right side of the screen as shown in the previous image. To edit these items in a separate screen click on the appropriate label above the textbox in the previous screen. The Function/Variable Editor is shown below. Variables are letters or words that represent a number. For example if you assign the number 2 to the variable n and the number 3 to the variable m then n + m = 5. Functions are written in the language VBScript. Information for VBScript can be found on the web and at the main website http://msdn.microsoft.com/en-us/library/t0aew7h6.aspx.

Calculator Function Editor

Brief History of Math and Calculating Different Bases

Math has been around for thousands of years, but the way that people count has changed over time. Today people use the decimal system (base 10) for most math calculations, but there are other numbering systems called bases. Computers often work with hexadecimal numbers (base 16) and binary numbers (base 2). With base 10 there are 10 symbols (0 to 9) and numbers are grouped by 10 but with base 16 there are 16 symbols (0 to 9, A to F) and numbers are grouped by 16. The duodecimal system (base 12) is used in U.S. and U.K. on rulers for measuring length because 12 easily divides by 2, 3, and 4 while decimal numbers (base 10) do not easily divide by 3. However the duodecimal system for measuring length contains the same symbols (0 to 9) as the decimal system so it can be difficult to understand that it is actually a different numbering system.
Civilizations through out history have used different bases in counting. 5,000 years ago the Babylonians now present day Iraq, used base 60 when counting and performing math calculations. They choose this base because it divides well with many divisors. Around the same time period the Egyptians counted with base 10, but unlike the numbering system we use today, their base 10 numbering system did not include the number 0. 1,700 to 400 years ago the Mayas in Mexico and Central America who were very advanced in math and astrology used base 20 because they counted with both fingers and toes. The base 10 numbering system that we use today originated from India over 1,000 years ago and was created because we have 10 fingers so it makes counting with our hands easy.
Numbers can actually be expressed in a formula (Number * Base ^ Position of Number) + (...) + (...). Using this formula the number 123.4 can be written as (1 * 10 ^ 2 = 100) + (2 * 10 ^ 1 = 20) + (3 * 10 ^ 0 = 3) + (4 * 10 ^ -1 = 0.4). The number 18.625 is shown below in both decimal and binary formats.
Decimal 18.625 = 1*10^1 = 10 + 8*10^ 0 = 8 + 6*10^-1 = 0.6 + 2*10^-2 = 0.02 + 5*10^-3 = 0.005
Binary 10010.101 = 1*2^4 = 16 + 0*2^3 = 0 + 0*2^2 = 0 + 1*2^1 = 2 + 0*2^0 = 0 + 1*2^-1 = 0.5 + 0*2^-2 = 0 + 1*2^-3 = 0.125
InfoFind can convert numbers of any size from any base between 2 and 95 to any other base between 2 and 95. Base 2 is the smallest base possible and base 95 is all printable characters on a standard keyboard, so it is the largest base that most computers can handle. InfoFind can also convert decimal numbers from any base to any base and InfoFind works with the negative number symbol. If converting decimal numbers see the topic Base Conversion Decimal Point Errors for additional info.
The base number calculator in InfoFind is below the results area on the scientific calculator. To use the base number calculator select the from and to bases, enter the number that you want to convert in the [Convert From Base] section, and as you enter the number the translated value will appear below in the [To Base] section. Below are several examples of converting from one base to another base.

Decimal Number Base Conversion with InfoFind

Decimal Number Base Conversion with InfoFind

Decimal Number Base Conversion with InfoFind

Creating Your Own Numbering System

InfoFind allows you to create you own numbering systems by specifying what characters to use. For example we use 0 to 9 for the decimal system but if you wanted to use A to J instead then the number 10 would appear as BA. This is specified in the calculator options and applies only to the base number section of the scientific calculator and the big number calculator. By default all numbering systems except for base 64 use the following pattern.
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"'\/[]:, .
Base 64 is actually a common numbering systems for computers and used internally when email messages are sent. It is specified in the format:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
Base 64 is specified in the calculator options and can be changed at any time along with any of the other bases.

Base Conversion Decimal Point Errors

Whole Numbers (numbers with out a decimal point) can always be converted from one base to another. But the fractional portion of decimal numbers does not always fully translate from one base to another base. An example is shown below when converting a decimal from base 3 to base 10 and vise versa.
In base 3 the number 222.1 has the same value as the base 10 number 26 and 1/3. However when in decimal format 1/3 is written as 0.3333333 and the number of decimal places for 3 never ends. So this means that in base 10 numbers such as 1/3 or 2/3 cannot actually be fully written, but in base 3 the numbers 1/3 and 2/3 can be written with only 1 digit. The following images shows this.

Decimal Number Base Conversion with InfoFind

Now when you take the base 10 number 26.33333.... and try to convert it to base 3 you end up with 222.022222....

Decimal Number Base Conversion with InfoFind

Now if you try the same number with just 1 decimal place 26.3 you end up with a different number.

Decimal Number Base Conversion with InfoFind

The number of decimal places displayed is set from the calculator options screen. Among calculators that actually convert from one base to another, very few work with decimals places. InfoFind correctly calculates the results for you, but keep in mind that some fractional numbers do not fully translate to fractional numbers in another base.

Calculator Options

You can access the calculator options from the [Options] button on the scientific calculator and from the main options screen. With the calculator options you can specify what colors are used for the calculator and how the results are displayed. Advanced Settings apply to the base number section of the scientific calculator and the big number calculator. With the advanced settings you can even create your own numbering system . To do this and change the symbols for a specific base, click on the base from the list or type in the base and the symbols below the list. When finished updating click the [Update] button. To remove a custom math base select the item from the list and click the [Remove] button.

InfoFind Calculator Options

Scientific Calculator Functions

InfoFind's calculator is based on the language VBScript so most functions in VBScript can be used in the workspace. Detailed information for VBScript can be found on the web and at the main website http://msdn.microsoft.com/en-us/library/t0aew7h6.aspx. Here is an overview of some of the functions and operators that you can use:
Operator Description
\ Integer Division: Divides two numbers and returns an integer result (Number without the decimal portion). In division 10/3 = 3.333 but with integer division 10\3 = 3.
Mod Remainder: Divides two numbers and returns only the remainder. 10 Mod 3 = 1
And Performs a logical conjunction on two expressions. If, and only if, both expressions evaluate to True, result is True. If either expression evaluates to False, result is False. Examples: True And True = True, True And False = False
Or Performs a logical disjunction on two expressions. If either or both expressions evaluate to True, result is True. Examples: True Or True = True, True Or False = True, False Or False = False
Xor Performs a logical exclusion on two expressions. If one, and only one, of the expressions evaluates to True, result is True. Examples: True Xor True = False, True Xor False = True, False Xor False = False
Eqv Performs a logical equivalence on two expressions. Examples: True Eqv True = True, True Eqv False = False, False Eqv False = True
Imp Performs a logical implication on two expressions. Examples: True Imp False = False, False Imp True = True
Not Used to perform logical negation on an expression. Examples: Not True = False, Not False = True
Function Description
Sqr(Number) Returns the square root of a number. A factor of a number that when squared returns the number. Example: 3 = Sqr(9) because 3^2 = 9
Atn(Number) Returns the arctangent of a number. The Atn function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle. The range of the result is -pi /2 to pi/2 radians.
Cos(Number) Returns the cosine of an angle. The Cos function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse. The result lies in the range -1 to 1.
Sin(Number) Returns the sine of an angle. The Sin function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the hypotenuse. The result lies in the range -1 to 1.
Tan(Number) Returns the tangent of an angle. Tan takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.
Exp(Number) Returns e (the base of natural logarithms) raised to a power. If the value of number exceeds 709.782712893, an error occurs. The constant e is approximately 2.718282.
Log(Number) Returns the natural logarithm of a number. The natural logarithm is the logarithm to the base e. The constant e is approximately 2.718282.
Rnd() Returns a random number. The Rnd function returns a value less than 1 but greater than or equal to 0. To return a random number in a specified range use the following formula: Int((High - Low + 1) * Rnd() + Low)
Abs(Number) Returns the absolute value of a number. Examples: Abs(10) = 10, Abs(-10) = 10
Round(Number, DecimalPlaces) Returns a number rounded to a specified number of decimal places.
Fix(Number) Returns the integer portion of a number. The difference between Int and Fix is that if number is negative, Int returns the first negative integer less than or equal to number, whereas Fix returns the first negative integer greater than or equal to number. For example, Int converts -8.4 to -9, and Fix converts -8.4 to -8.
Int(Number)
Trigonometry is a topic of mathematics that defines the dimensions of triangles and angles. There are two types of trigonometry - plane trigonometry, which calculates triangles on a flat surface, and spherical trigonometry, which calculates triangles that are sections on the surface of a sphere.
The common trigonometry functions used in InfoFind (Atn, Cos, Sin, and Tan) work in Radians rather then Degrees. To convert degrees to radians, multiply degrees by pi /180. To convert radians to degrees, multiply radians by 180/pi. The functions below can be copied to the function editor and used for this purpose.
'Convert from degrees to radians.
Function DegreesToRadians(Degrees)
     DegreesToRadians = Degrees * 3.14159265358979 / 180
End Function

'Convert from radians to degrees.
Function RadiansToDegrees(Radians)
     RadiansToDegrees = Radians * 180 / 3.14159265358979
End Function
The following picture shows the common Trigonometry functions and how they are calculated.

Trigonometry

Arctangent (Atn) is the inverse function of Tangent. Examples: Atn(Tan(X)) = X and Tan(Atn(X)) = X
The following functions do not have buttons on the calculator but they are part of the program and can be manually entered as shown in the 2nd column.
Name Function Formula
Secant Sec(X) 1 / Cos(X)
Cosecant Cosec(X) 1 / Sin(X)
Cotangent Cotan(X) 1 / Tan(X)
Inverse Sine Arcsin(X) Atn(X / Sqr(-X * X + 1))
Inverse Cosine Arccos(X) Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
Inverse Secant Arcsec(X) Atn(X / Sqr(X * X - 1)) + Sgn((X) -1) * (2 * Atn(1))
Inverse Cosecant Arccosec(X) Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * (2 * Atn(1))
Inverse Cotangent Arccotan(X) Atn(X) + 2 * Atn(1)
Hyperbolic Sine HSin(X) (Exp(X) - Exp(-X)) / 2
Hyperbolic Cosine HCos(X) (Exp(X) + Exp(-X)) / 2
Hyperbolic Tangent HTan(X) (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X))
Hyperbolic Secant HSec(X) 2 / (Exp(X) + Exp(-X))
Hyperbolic Cosecant HCosec(X) 2 / (Exp(X) - Exp(-X))
Hyperbolic Cotangent HCotan(X) (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))
Inverse Hyperbolic Sine HArcsin(X) Log(X + Sqr(X * X + 1))
Inverse Hyperbolic Cosine HArccos(X) Log(X + Sqr(X * X - 1))
Inverse Hyperbolic Tangent HArctan(X) Log((1 + X) / (1 - X)) / 2
Inverse Hyperbolic Secant HArcsec(X) Log((Sqr(-X * X + 1) + 1) / X)
Inverse Hyperbolic Cosecant HArccosec(X) Log((Sgn(X) * Sqr(X * X + 1) +1) / X)
Inverse Hyperbolic Cotangent HArccotan(X) Log((X + 1) / (X - 1)) / 2
Logarithm to base N LogN(X) Log(X) / Log(N)
InfoFind's Calculator provides several date functions that can be manually entered. These can be very usefully in case you want to add one date from another, find out how many days are in-between two dates, and much more.
Function Description
Date Returns the current date according to the setting of your computer's system date and time.
Time Returns the current time according to the setting of your computer's system date and time.
Now Returns the current date and time according to the setting of your computer's system date and time.
DateAdd(Interval, Number, Date) Returns a date to which a specified time interval has been added. Interval can be of the following values: ("yyyy" = Year, "q" = Quarter, "m" = Month, "y" = Day of year, "d" = Day, "w" = Weekday, "ww" = Week of year, "h" = Hour, "n" = Minute, "s" = Second) Example: 1/31/2011 = DateAdd("m", 1, #12/31/10#)
DateDiff(Interval, Date1, Date2) Returns the number of intervals between two dates. You can use the DateDiff function to determine how many specified time intervals exist between two dates. For example, you might use DateDiff to calculate the number of days between two dates, or the number of weeks between today and the end of the year. Interval are specified with the same values as the DateAdd function listed above. Exaple: 31 = DateDiff("d", #12/31/10#, #1/31/11#)
DatePart(Interval, Date) Returns the specified part of a given date. Interval are specified with the same values as the DateAdd Function listed above. Example: 4 = DatePart("q", #12/31/11#)
Easter
In Christianity Easter is an annual festival that Christians celebrate the Resurrection of Jesus Christ. Many publications list Easter as the first Sunday after the first Full Moon following the vernal equinox. That definition is actually incorrect and the following rules are how Easter is determined. The date of Easter occurs on the first Sunday following the Paschal Full Moon for the year. The Paschal Full Moon is the first Ecclesiastical Full Moon date after March 20. Ecclesiastical means related to the Church and Ecclesiastical Full Moons are approximated astronomical full moon dates, not actual astronomical full moon dates. There are several different dates for Easter. Two methods are in use today with Western Churches celebrating Easter on one date calculated using the Gregorian calendar and Eastern Orthodox Churches celebrating it on another date calculated using the Julian calendar.
Julian calendar: The Julian calendar was a solar calendar introduced by the Roman Emperor Julius Caesar in 46 B.C. to replace the Roman calendar. The Roman calendar was a lunisolar calendar but it was maintained by corrupt politicians who would add or remove days from the calendar as they wanted so it became inaccurate for farming and for festivals. In the Julian calendar a common year is defined to comprise 365 days, and every forth year is a leap year comprising 366 days. The Julian calendar was superseded by the Gregorian calendar.
Gregorian calendar: The Gregorian calendar was introduced by Pope Gregory XIII in 1582 to replace the Julian calendar; and the Gregorian calendar is the calendar now used as the civil calendar in most countries. The Gregorian calendar differs only slightly from the Julian calendar and was introduced because over time differences had accumulated compared to the actual solar time period so Easter was occurring before the Vernal Equinox. Like the Julian calendar in the Gregorian calendar a common year is defined to comprise 365 days, and leap years comprising of 366 days; but in the Gregorian calendar every year that is exactly divisible by four is a leap year, except for centurial years, which must be divisible by 400 to be leap years. Thus, 2000 is a leap year, but 1900 and 2100 are not leap years.

Function Description
Easter(Year) Returns the date of Easter for Western Churches for any year from 1583 to 4099.
EasterOrthodox(Year) Returns the date of Easter for Eastern Orthodox Churches for any year from 1583 to 4099.
EasterJulian(Year) Returns the date of Easter for the Julian calendar for any year from 326 AD. This method is no longer used today.

Color Functions

InfoFind’s Calculator includes several Color functions which can be useful for Web Designers or Graphic Artists.
Function Description
HTMLColor(RGB(Number, Number, Number)) The function HTMLColor() takes a Standard Red, Green, and Blue Color Number between 0 and 255 and prints out the HTML Hexadecimal Equivalent that is used for specifying colors on web pages. For example: #0054E3 = HTMLColor(RGB(0, 84, 227))
BlendColor(Color, Color) The function BlendColor() is a function that combines two colors and returns a new Color in HTML Hexadecimal Format. BlendColor is actually used internally by InfoFind to determine how to draw controls of the same color but a different shade. Parameters for BlendColor can be specified in either HTML Color or in Red, Green, Blue Color Format. For example: #7FA9F1 = BlendColor(RGB(0, 84, 227), #FFFFFF)