Open DonaldTsang opened 7 years ago
Also for Number theory https://en.wikipedia.org/wiki/Kronecker_symbol
Since each feature implemented is a significant amount of work, and uses up symbols, I'm only going to consider implementing features where either there's a challenge it would have helped on, or via a pull request.
For Kronecker symbol (the person golfing it is using Pyth as a base) https://codegolf.stackexchange.com/questions/65366/calculate-the-kronecker-symbol
Methods for saving space: Compress long integer variable into larger bases and removing trailing zeros Long string or byte data compression using LZMA, uncompressed when used Multiple formats of Base62 and Base64 (common and URL-safe) Python-compatible Base85 https://tools.ietf.org/html/draft-kwiatkowski-base85-for-xml-00 Base91 https://github.com/SunDwarf/base91-python
Fractions and Complex math:
Angular divisions (assuming degrees are default):
/izT360
: https://en.wikipedia.org/wiki/Turn_(geometry)*/izT360 400
: https://en.wikipedia.org/wiki/Gradian*/izT360 256
: https://en.wikipedia.org/wiki/Binary_scaling#Binary_anglesBase conversion and Logarithm:
.lzT
.lz12
and Vigesimal.lz20
base logarithmTime:
date.isocalendar()
and day of the yeardate.toordinal()
date.fromordinal(ordinal)
Matrix addition, multiplication, modulo, inverses and shifting rows or columns
Possible shortcuts for symmetric cryptography: AES-style S-box support for cryptographic hashes and ciphers Example hashes: SHA2, Groestl, Skein, BLAKE/BLAKE2 Possible cipher support: AES, Serpent, Twofish, Camellia
Possible shortcuts for prime number cryptography: Finding the next or last N primes of a number Generating a list of random primes between M and N Euler totient function or Carmichael's totient function Check if a list of numbers is pair-wise or group-wise coprime
Possible shortcuts for error correction and image generation: Creating gif, jpg and png from an array of integers with optional color dictionary Reed–Solo mon error correction when provided data and amount of error tolerance Binary hamming error-correction provided dimensions, and Golay error correction Example: https://github.com/joshim5/reedsolomon Example: https://github.com/gauravjuvekar/unireedsolomon
Other references for what features we could copy from other languages: https://codegolf.meta.stackexchange.com/questions/8798/golfing-class-of-a-language