Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
NB. Temp conversions are all linear polynomials
K2K =: 0 1 NB. K = (1 *k) + 0
K2C =: _273 1 NB. C = (1 *k) - 273
K2F =: _459.67 1.8 NB. F = (1.8*k) - 459.67
K2R =: 0 1.8 NB. R = (1.8*k) + 0
NB. Do all conversions at once (eval
NB. polynomials in parallel). This is the
NB. numeric matrix J programs would manipulate
NB. directly.
k2KCFR =: (K2K , K2C , K2F ,: K2R) p./ ]

View file

@ -0,0 +1,22 @@
NB. Format matrix for printing & tag each
NB. temp with scale, for human legibility
fmt =: [: (;:inv"1) 0 _1 |: 'KCFR' ;"0 1"_1 '0.2' 8!:0 ]
kcfr =: fmt@k2KCFR
kcfr 21
K 21.00
C -252.00
F -421.87
R 37.80
kcfr 0 NB. Absolute zero
K 0.00
C -273.00
F -459.67
R 0.00
kcfr 21 100 300 NB. List of temps works fine
K 21.00 100.00 300.00
C -252.00 -173.00 27.00
F -421.87 -279.67 80.33
R 37.80 180.00 540.00