Fix memory errors

This commit is contained in:
Isaac Shoebottom 2024-02-17 21:24:22 -04:00
parent 3816763622
commit 3426d4575c
2 changed files with 33 additions and 37 deletions

View File

@ -259,33 +259,31 @@ def pd_from(x, l):
def man():
"""
Prints the manual for the module.
Formatted this way to fit in memory on the calculator.
"""
print(
"""
This module contains functions for computing the total probability of events.
The functions are:
bnd(x, n, p) - The binomial distribution
bnd_mean(n, p) - The mean of the binomial distribution
bnd_var(n, p) - The variance of the binomial distribution
bnd_std(n, p) - The standard deviation of the binomial distribution
bnd_upto(x, n, p) - The cumulative probability of getting upto x successes in n trials
bnd_from(x, n, p) - The cumulative probability of getting from x successes in n trials
gd(x, p, q) - The geometric distribution
gd_mean(p) - The mean of the geometric distribution
gd_var(p) - The variance of the geometric distribution
gd_std(p) - The standard deviation of the geometric distribution
gd_upto(x, p, q) - The cumulative probability of getting upto x trials until the first success
gd_from(x, p, q) - The cumulative probability of getting from x trials until the first success
hgd(x, N, n, k) - The hyper geometric distribution
hgd_mean(N, n, k) - The mean of the hyper geometric distribution
hgd_var(N, n, k) - The variance of the hyper geometric distribution
hgd_std(N, n, k) - The standard deviation of the hyper geometric distribution
hgd_upto(x, N, n, k) - The cumulative probability of getting upto x successes in n draws from a population of size N with k successes
hgd_from(x, N, n, k) - The cumulative probability of getting from x successes in n draws from a population of size N with k successes
pd(x, l) - The poisson distribution
pd_mean(l) - The mean of the poisson distribution
pd_var(l) - The variance of the poisson distribution
pd_std(l) - The standard deviation of the poisson distribution
pd_upto(x, l) - The cumulative probability of getting upto x occurrences
pd_from(x, l) - The cumulative probability of getting from x occurrences
""")
print("This module contains functions for computing the total probability of events.")
print("The functions are:")
print("bnd(x, n, p) - The binomial distribution")
print("bnd_mean(n, p) - The mean of the binomial distribution")
print("bnd_var(n, p) - The variance of the binomial distribution")
print("bnd_std(n, p) - The standard deviation of the binomial distribution")
print("bnd_upto(x, n, p) - The cumulative probability of getting upto x successes in n trials")
print("bnd_from(x, n, p) - The cumulative probability of getting from x successes in n trials")
print("gd(x, p, q) - The geometric distribution")
print("gd_mean(p) - The mean of the geometric distribution")
print("gd_var(p) - The variance of the geometric distribution")
print("gd_std(p) - The standard deviation of the geometric distribution")
print("gd_upto(x, p, q) - The cumulative probability of getting upto x trials until the first success")
print("gd_from(x, p, q) - The cumulative probability of getting from x trials until the first success")
print("hgd(x, N, n, k) - The hyper geometric distribution")
print("hgd_mean(N, n, k) - The mean of the hyper geometric distribution")
print("hgd_var(N, n, k) - The variance of the hyper geometric distribution")
print("hgd_std(N, n, k) - The standard deviation of the hyper geometric distribution")
print("hgd_upto(x, N, n, k) - The cumulative probability of getting upto x successes in n draws from a population of size N with k successes")
print("hgd_from(x, N, n, k) - The cumulative probability of getting from x successes in n draws from a population of size N with k successes")
print("pd(x, l) - The poisson distribution")
print("pd_mean(l) - The mean of the poisson distribution")
print("pd_var(l) - The variance of the poisson distribution")
print("pd_std(l) - The standard deviation of the poisson distribution")
print("pd_upto(x, l) - The cumulative probability of getting upto x occurrences")
print("pd_from(x, l) - The cumulative probability of getting from x occurrences")

View File

@ -37,11 +37,9 @@ def man():
"""
Prints the manual for the module.
"""
print("""
This module contains functions for computing the total probability of events.
The functions are:
i(A, B) - The intersection of A and B
u(A, B) - The union of A and B
g(A, B) - The conditional probability of A given B
n(A) - The negation of A
""")
print("This module contains functions for computing the total probability of events.")
print("The functions are:")
print("i(A, B) - The intersection of A and B")
print("u(A, B) - The union of A and B")
print("g(A, B) - The conditional probability of A given B")
print("n(A) - The negation of A")