rat_trig package¶
Submodules¶
rat_trig.skeleton module¶
This is a skeleton file that can serve as a starting point for a Python
console script. To run this script uncomment the following lines in the
[options.entry_points] section in setup.cfg:
console_scripts =
fibonacci = rat_trig.skeleton:run
Then run pip install . (or pip install -e . for editable mode)
which will install the command fibonacci inside your current environment.
Besides console scripts, the header (i.e. until _logger…) of this file can
also be used as template for Python modules.
Note
This file can be renamed depending on your needs or safely removed if not needed.
References
- rat_trig.skeleton.main(args)[source]¶
Wrapper allowing
fib()to be called with string arguments in a CLI fashionInstead of returning the value from
fib(), it prints the result to thestdoutin a nicely formatted message.- Parameters:
args (List[str]) – command line parameters as list of strings (for example
["--verbose", "42"]).
- rat_trig.skeleton.parse_args(args)[source]¶
Parse command line parameters
- Parameters:
args (List[str]) – command line parameters as list of strings (for example
["--help"]).- Returns:
command line parameters namespace
- Return type:
rat_trig.trigonom module¶
Rational Trigonometry is a new approach to classical trigonometry, developed by Norman Wildberger, that aims to simplify and clarify the subject by using only rational numbers and operations, rather than irrational numbers and limits.
In traditional trigonometry, concepts such as the sine, cosine, and tangent of an angle are typically defined using circles and the unit circle in particular. These definitions involve irrational numbers and limits, which can make the subject more difficult to understand and work with.
In rational trigonometry, Wildberger replaces these circular definitions with ones based on lines and line segments, which allows for a more straightforward and intuitive approach. The fundamental concepts in rational trigonometry are the “quadaverage” and the “dilated directed angle,” which are defined in terms of lines and line segments, rather than circles.
Rational trigonometry has been gaining popularity in recent years, as it provides a useful alternative to traditional trigonometry for certain applications, such as computer graphics, robotics, and physics. It can also be a helpful tool for students who struggle with the irrational numbers and limits used in traditional trigonometry.
In summary, Rational Trigonometry is a new approach to classical trigonometry that uses rational numbers and operations, rather than irrational numbers and limits, making it a more straightforward and intuitive subject to understand and work with.
- rat_trig.trigonom.archimedes(q_1: T, q_2: T, q_3: T) T[source]¶
The function archimedes calculates the qudrea of a triangle using Archimedes’ formula with the lengths of the three sides q_1, q_2, and q_3. It can also be used to check if a quadraple with length Q1, Q2, Q3, Q4 is on a circle.
- Parameters:
q_1 (T) – The function archimedes takes three parameters q_1, q_2, and q_3 of type T and returns a value of type T
q_2 (T) – The q_2 parameter in the archimedes function represents a value of type T. It is one of the input parameters along with q_1 and q_3. The function performs a calculation using these parameters and returns a result of type T
q_3 (T) – The function archimedes takes three parameters q_1, q_2, and q_3, all of type T. It then calculates a value based on these parameters and returns the result
- Returns:
the result of the expression (4 times q_1 times q_2 - text{temp}^2), where (text{temp} = q_1 + q_2 - q_3).
Example
>>> q_1 = Fraction(1, 2) >>> q_2 = Fraction(1, 4) >>> q_3 = Fraction(1, 6) >>> archimedes(q_1, q_2, q_3) Fraction(23, 144)