GNU/Linux factor Bash tool and python3.
# bash shell
$ factor 101| //header | |
| #pragma GCC target ("avx2") | |
| #pragma GCC optimize ("O3") | |
| #pragma GCC optimize ("unroll-loops") | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| typedef long long int ll; | |
| typedef long double ld; |
# update system
sudo apt update && sudo apt upgrade -y
# install build tools and python prerequisites
sudo apt install build-essential libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev
# download and extract pythonIn reverse chronological order from gist creation:
According to the lemma in the English Wikipedia:
CORDIC (for COordinate Rotation DIgital Computer), also known as Volder's algorithm, or: Digit-by-digit method Circular CORDIC (Jack E. Volder),[1][2] Linear CORDIC, Hyperbolic CORDIC (John Stephen Walther),[3][4] and Generalized Hyperbolic CORDIC (GH CORDIC) (Yuanyong Luo et al.),[5][6] is a simple and efficient algorithm to calculate trigonometric functions, hyperbolic functions, square roots, multiplications, divisions, and exponentials and logarithms with arbitrary base, typically converging with one digit (or bit) per iteration. CORDIC is therefore also an example of digit-by-digit algorithms. CORDIC and closely related methods known as pseudo-multiplication and pseudo-division or factor combining are commonly used when no hardware multiplier is available (e.g. in simple microcontrollers and FPGAs), as the only operations it requires are additions, subtractions, bitshift and lookup tables. As
| // Link to the original: http://www.jsoftware.com/jwiki/Essays/Incunabulum | |
| // Found at https://news.ycombinator.com/item?id=8533843 | |
| typedef char C; | |
| typedef long I; | |
| typedef struct a { | |
| I t,r,d[3],p[2]; | |
| }* A; |
| Below are the Big O performance of common functions of different Java Collections. | |
| List | Add | Remove | Get | Contains | Next | Data Structure | |
| ---------------------|------|--------|------|----------|------|--------------- | |
| ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
| LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
| CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array |
| -- Authors: Mike Spivey and Silvija Seres | |
| -- Taken from: https://www.cs.ox.ac.uk/publications/books/fop/dist/fop/chapters/9/Logic.hs, | |
| -- "The fun of programming book", https://www.cs.ox.ac.uk/publications/books/fop/, | |
| -- Chapter 9, Combinators for logic programming | |
| -- Haskell 98 compliant. | |
| module Logic where | |
| import List | |
| -- Section 9.2 |