Created
March 30, 2021 07:29
-
-
Save jsrimr/27468f22a17192544d88d66148bfc82c to your computer and use it in GitHub Desktop.
fast and accurate scaling compared to compound scaling
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
#compound scaling | |
scale_coeff = [0.5, 1.0, 1.5] | |
for coeff in scale_coeff: | |
print(a ** coeff, b**(coeff) , c**(coeff)) | |
#1.0954451150103321 1.0488088481701516 1.0723805294763609 | |
#1.2 1.1 1.15 | |
#1.3145341380123985 1.153689732987167 1.2332376088978148 | |
# W scaling | |
alpha = .8 | |
e_d = (1-alpha) / 2 | |
e_w = alpha / 2 | |
e_r = (1-alpha) / 4 | |
for coeff in scale_coeff: | |
s = 2 ** coeff | |
print(s ** e_d, s**e_w , s**e_r) | |
#1.0352649238413776 1.148698354997035 1.0174796921026863 | |
#1.0717734625362931 1.3195079107728942 1.0352649238413776 | |
#1.109569472067845 1.5157165665103982 1.0533610359548358 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment