This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from tabulate import tabulate | |
def amort(principal, rate, n): | |
return principal * (rate * ((1 + rate) ** n)) / ((1 + rate) ** n - 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from decimal import Decimal, getcontext | |
import matplotlib.pyplot as plt | |
# Set the desired precision | |
getcontext().prec = 28 | |
# Define the tent map function using Decimal for high precision | |
def tent_map(x, r): | |
half = Decimal('0.5') | |
return r*x if x < half else r*(1-x) |
OlderNewer