{% extends "base.html" %} {% block title %}Math Tools | USSU Algorithm Analyzer v4.0{% endblock %} {% block content %}

Select Tool

Tool Info

Euclidean GCD

O(log min(a,b)) O(1) Space

Ancient algorithm for greatest common divisor. Foundation of modular arithmetic.

Sieve of Eratosthenes

O(n log log n) O(n) Space

Find all primes up to n. Most efficient prime generation algorithm.

Fast Exponentiation

O(log n) O(1) Space

Binary exponentiation. Critical for cryptography and modular arithmetic.

{% if result %}

Result

Algorithm
{{ result.algorithm }}
Time (ms)
{{ "%.4f"|format(result.execution_time_ms) }}
Memory
{{ "%.2f"|format(result.memory_used_kb) }} KB
Iterations
{{ result.iterations }}
Recursions
{{ result.recursions }}
Complexity
{{ result.time_complexity }}
Time (ms)
{{ "%.4f"|format(result.execution_time_ms) }}
Iterations
{{ result.iterations }}
Recursions
{{ result.recursions }}
{% if result.result is defined %}Result: {{ result.result }}
{% endif %} {% if result.sequence is defined %}Sequence: {{ result.sequence }}
{% endif %} {% if result.gcd is defined %}GCD: {{ result.gcd }}
{% endif %} {% if result.x is defined %}x: {{ result.x }} | y: {{ result.y }}
{% endif %} {% if result.is_prime is defined %}{{ result.n if result.n is defined else '' }} is {{ "prime" if result.is_prime else "not prime" }}
{% endif %} {% if result.primes is defined %}Primes: {{ result.primes }}
Count: {{ result.count }}
{% endif %} {% if result.result is defined and result.result is iterable and result.result is not string %}Matrix Result: {{ result.result }}
{% endif %} {% if result.moves is defined %}Total Moves: {{ result.total_moves }}
Moves: {{ result.moves }}
{% endif %} {% if result.permutations is defined %}Count: {{ result.count }}
Permutations: {{ result.permutations }}
{% endif %}
{% endif %} {% endblock %} {% block extra_scripts %} {% endblock %}