## Examples Explained

## Popular

- Typical calculation of expenses in a bar

12.30+2.7+3*4.25+10*1.06+31.09 - A product costs 193.31. How much are you going to pay after a 6.2% discount?

193.31*(100-6.2)% - Conversion from 25� Celsius to Fahrenheit and Kelvin.

conv(25,C,F)

conv(25,C,K) - Circle area of 5.7 radius

PI*pow(5.7,2) - Knowing that an angle sine is 1/2, what is the angle in radians and degrees?

asin(1/2)

deg(asin(1/2)) - Square root of 144 and cubic root of 4913

sqrt(144,2)

pow(4913,1/3) - Number of days since D-Day in June 6, 1944 and the corresponding weekday (date format M,D,Y)

days(6,6,1944)

weekday(6,6,1944) - Bruna was born at 10/25/2006. What is the approximated conception date (date format M,D,Y)?

(Consider a normal pregnancy period 40 weeks long)

dateprojection(-40*7, 10,25,2006) - The number of five-card hands possible from a standard fifty-two card deck is:

combination(52,5) - Conversion from hexadecimal (base 16) to decimal (base 10)

0xF40C - The Sun mass is 1.9891e+30 kg, having 73.46% of Hydrogen, which 1 kg has 6.02e+26 atoms. How many Hydrogen atoms exist in the Sun? (The numbers are in scientific notation)

1.9891e+30 * 73.46% * 6.02e+26

## Finance

The financial functions PV, FV, PMT, RATE e NPER work the same as in Excel.

- A TV price rises from 910 to 1230. What is the percentage raise?

100*(1230-910)/910 - Future Value of monthly deposits of $200 during 24 months at 2% interest rate per month

fv(2%,24,-200) - Future Value of a single deposit of $2000 after 20 months at 0.9% per month

fv(0.9%,20,0,-2000)

Alternatively:

2000*pow(1+0.9%,20) - Present Value of 20 installments of $110 at 1.5% monthly interest rate

pv(1.5%,20,-110) - Present Value of $1000 for 12 months forward at 1.5% monthly interest rate

pv(1.5%,12,0,-1000) - Monthly payment of a car mortgage of $20200 at 20% per year (nominal interest rate), during 24 months

pmt(20%/12, 24, -20200) - Annual nominal interest rate of a mortgage of $30000 at 60x of $863 monthly payments

100*12*rate(60,863,-30000) - Number of payments of a mortgage of $30000 at 2% monthly and $863 per month

nper(2%,863,-30000) - How many months we need to let $4000 invested at 1.5% monthly, in order to reach $8000?

nper(1.5%,0,-4000,8000) - Conversion from 1.53% monthly to the effective annual interest rate

100*(pow(1+1.53%, 12) - 1) - Conversion from effective annual interest rate of 20% to monthly equivalent

100*(pow(1+20%, 1/12) - 1)

## Conversions

- Conversion from 85 miles/hour to km/h

conv(85,mile/hour,km/h) - Conversion from 30 yards to meters

conv(30,yard,m) - Conversion from 60 centimeters to inches

conv(60,cm,inch) - In the car manual is stated that the tire must be calibrated at 2.1 bar. What is the psi equivalent?

conv(2.1,bar,psi) - In the chocolate pack is written 7.3oz. How many grams it weights?

conv(7.3,oz,g) - The distance from our solar system to the closest star is 4.22 light years. What is the miles equivalent?

conv(4.22,ly,mile) - A space shuttle achieves 18500 mile/h. How long would it take to reach the closest star (in days)?

(conv(4.22,ly,mile)/18500)/24 - Convertion of the number 61500 to bases hexadecimal, octal and binary

hex(61500)

oct(61500)

bin(61500)

See below the complete unit Conversions reference supported by the *conv* function.

## Others

- The remainder of 153 divided by 21 (also known as "modulo of 153 by 21")

153 mod 21 - Number of days between two dates

days(05,10,2006, 12,31,2008) - Sine of 30�

sin(radianos(30)) - Number of anagrams that could be made from the word "brasil"

permutation(6,6) - Calculating the average and standard deviation, given the following heights of a basketball team: 1.89,1.93,2.02,1.95,1.87,2.05,2.12

mean(1.89,1.93,2.02,1.95,1.87,2.05,2.12)

stdev(1.89,1.93,2.02,1.95,1.87,2.05,2.12) - The maximum common divisor of numbers 24, 36 e 48

mcd(24,36,48) - The least common multiple (or lower common multiple) of numbers 8, 9 e 21

lcm(8,9,21) - How many bits are needed to store a number with a limit of 6 digits?

(We just need to calculate the base 2 logarithm of 999999 and round it up)

ceil(log(999999,2)) - Random number between 0 and 100

round(random()*100)

“Because a good example worth more than a thousand words in a boring manual.”