Created
January 7, 2024 20:55
-
-
Save DonSheddow/8db03d3e032a1116906befedc7a020bd to your computer and use it in GitHub Desktop.
Simple script to check math functions using various inputs
This file contains 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
let range = 1..5 | |
let rec = {a: 1, b: 2} | |
let table = [[a b]; [1 2] [3 4]] | |
let durations = [1sec 1min] | |
let filesizes = [100b 1kb] | |
print "\n ### avg ###" | |
print ($range | math avg) | |
print ($rec | math avg) | |
print ($table | math avg) | |
print ($durations | math avg) | |
print ($filesizes | math avg) | |
print "\n ### max ###" | |
print ($range | math max) | |
print ($rec | math max) | |
print ($table | math max) | |
print ($durations | math max) | |
print ($filesizes | math max) | |
print ([2022-02-02 2022-02-03] | math max) | |
print "\n ### min ###" | |
print ($range | math min) | |
print ($rec | math min) | |
print ($table | math min) | |
print ($durations | math min) | |
print ($filesizes | math min) | |
print ([2022-02-02 2022-02-03] | math min) | |
print "\n ### median ###" | |
print ($range | math median) | |
print ($rec | math median) | |
print ($table | math median) | |
print ($durations | math median) | |
print ($filesizes | math median) | |
print "\n ### sum ###" | |
print ($range | math sum) | |
print ($rec | math sum) | |
print ($table | math sum) | |
print ($durations | math sum) | |
print ($filesizes | math sum) | |
print "\n ### product ###" | |
print ($range | math product) | |
print ($rec | math product) | |
print ($table | math product) | |
print "\n ### stddev ###" | |
# print ($range | math stddev) | |
print ($rec | math stddev) | |
print ($table | math stddev) | |
print "\n ### variance ###" | |
# print ($range | math variance) | |
print ($rec | math variance) | |
print ($table | math variance) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment