Contact Information:
Use PM How to send a PM (personal message)
Brief Description:
This extension extends the standard Math category of MIT App Inventor by providing a wide range of advanced and commonly used mathematical functions not available by default. It is designed to simplify complex calculations for your apps by offering easy-to-use blocks for:
- Factorials
- Logarithms (natural and base 10)
- Power and square root calculations
- Trigonometric functions including sine, cosine, tangent, cotangent, secant, and cosecant
- Angle conversions between degrees and radians
- Basic statistical functions such as mean, variance, and standard deviation
- Utility functions like rounding, absolute value, minimum, and maximum
- Prime number checks and utilities (is prime, next prime)
- Fibonacci numbers and the golden ratio (Pi, Phi)
- Number theory helpers (GCD, LCM, even/odd checks)
- Random integer generation and more
The extension is built for stability and ease of use, allowing App Inventor users to implement powerful math operations with minimal effort and clean blocks. Compatible with most Android versions supported by MIT App Inventor.
Documentation
- Designer Properties:
No specific properties required; this is a non-visible helper component. - Blocks and Accepted Values:
Each block performs a specific mathematical function. Inputs are typically integers or doubles, and outputs match the expected mathematical results (e.g., double for floating-point results, int/long for integer results). See individual block descriptions for details.[quote="Taho_Lajoux, post:1, topic:152706, full:true"]
This extension extends the standard Math category of MIT App Inventor by providing a wide range of advanced and commonly used mathematical functions not available by default. It is designed to simplify complex calculations for your apps by offering easy-to-use blocks for:- Factorials
- Logarithms (natural and base 10)
- Power and square root calculations
- Trigonometric functions including sine, cosine, tangent, cotangent, secant, and cosecant
- Angle conversions between degrees and radians
- Basic statistical functions (mean, variance, standard deviation) (optional: if you add those)
- Utility functions like rounding, absolute value, minimum, and maximum
The extension is built for stability and ease of use, allowing App Inventor users to implement powerful math operations with minimal effort and clean blocks. Compatible with most Android versions supported by MIT App Inventor.
[/quote]
- Screenshots:
Blocks
-
Pi
: Returns the value of Pi. -
Fi
: Returns the Golden Ratio (Phi). -
Fibonacci
: Returns the n-th Fibonacci number. -
IsPrime
: Checks if a number is prime. -
NextPrime
: Returns the next prime number after n. -
GCD
: Returns the Greatest Common Divisor (GCD) of two integers. -
LCM
: Returns the Least Common Multiple (LCM) of two integers. -
RandomBetween
: Returns a random integer between min and max inclusive. -
Factorial
: Calculates factorial of a non-negative integer (supports up to 20!). -
NaturalLog
: Calculates natural logarithm (base e). -
Log10
: Calculates logarithm base 10. -
Power
: Raises base to the power exponent. -
SquareRoot
: Calculates square root. -
Sine
: Calculates sine (input in radians). -
Cosine
: Calculates cosine (input in radians). -
Tangent
: Calculates tangent (input in radians). -
Cotangent
: Calculates cotangent (input in radians). -
Secant
: Calculates secant (input in radians). -
Cosecant
: Calculates cosecant (input in radians). -
Round
: Rounds a double value to nearest int. -
Absolute
: Returns absolute value. -
Max
: Returns max of two doubles. -
Min
: Returns min of two doubles. -
IsEven
: Checks if a number is even. -
IsOdd
: Checks if a number is odd. -
DegreesToRadians
: Converts degrees to radians. -
RadiansToDegrees
: Converts radians to degrees. -
Floor
: Calculates floor of a number. -
Ceil
: Calculates ceiling of a number. -
SumOfList
: Calculates the sum of an array of numbers. -
MeanOfList
: Calculates the mean (average) of an array of numbers. -
VarianceOfList
: Calculates variance of an array of numbers. -
StdDevOfList
: Calculates standard deviation of an array of numbers. -
IsPerfectSquare
: Checks if a number is a perfect square. -
GCDMultiple
: Returns the greatest common divisor (GCD) of multiple numbers. -
LCMMultiple
: Returns the least common multiple (LCM) of multiple numbers.
Compatibility
- The extension has been tested and works on Android versions 5.0 and above, covering the majority of devices supported by MIT App Inventor.
- Uses standard Java Math library features and simple arithmetic to ensure broad compatibility and stability.
Changelog
- Version 1.0 — Initial release with 100+ advanced math functions covering arithmetic, algebra, trigonometry, statistics, and number theory.
Additional Notes
- No external APIs are used.
- This extension is free to use and distribute.
Downloads
V1 : tl.ext.ai2.mathhelper.aix (8.5 KB)