"Random collection of functions"
meters_per_inch = 0.0254;
pounds_per_kg = 2.2;

define private lbs_to_kg "Pounds to Kilograms" 
    (kg "Kilograms")
    (lbs "Pounds")
{
    kg = lbs / pounds_per_kg;
}

define private inches_to_meters "Inches to Meters"
    (meters "Meters")
    (inches "Inches")
{
    meters = inches * meters_per_inch;
}

define BMI "Body Mass Index Computation" 
    (BMI "Body MassIndex")
    (height "Height in Inches",
     weight "Weight in Pounds")
{
    local	meters "Height in Meters", kg "Weight in KG";

    meters = inches_to_meters (height);
    kg = lbs_to_kg (weight);
    BMI = kg / (meters * meters);
}

define f "Factorial"
    (f "Factorial")
    (v "value")
{
    if (v == 0) 
    {
	f = 1;
    }
    else
    {
	f = f (v-1) * v;
    }
}

define p "Pow"
    (p "Pow")
    (a "a", b "b")
{
    p = a ^ b;
}
