Module talk:ET

From Xenharmonic Wiki
Revision as of 06:29, 22 January 2024 by FloraC (talk | contribs) (re)
Jump to navigation Jump to search

Ratios for ed-phi, ed-e, and ed-pi

local common_suffix = {
	['3/2'] = 'f',
	['1618033988749895/1000000000000000'] = 'ϕ',
	['2'] = 'o',
	['2/1'] = 'o',
	['3'] = 't',
	['3/1'] = 't',
	['2718281828459045/1000000000000000'] = 'n',
	['3141592653589793/1000000000000000'] = 'π'
	
}
local common_ratio = {
	['f'] = rat.new(3, 2),
	['ϕ'] = rat.new(1618033988749895, 1000000000000000),
	['o'] = 2,
	['t'] = 3,
	['n'] = rat.new(2718281828459045, 1000000000000000),
	['π'] = rat.new(3141592653589793, 1000000000000000)
}

I had to undo a recent change (see above) since it was resulting in several templates breaking; specifically, the rat module was taking a very long time to calculate these large ratios and resulting in the interpreter terminating with signal 24. If these changes are necessary, might I suggest hardcoding them instead? Ganaram inukshuk (talk) 01:15, 22 January 2024 (UTC)

I just did that change to ensure that the irrational numbers are fully accurate, so it's not necessary. I've put it down to 6 decimal digits now.
CompactStar (talk) 01:52, 22 January 2024 (UTC)
Those aren't significantly more accurate than before. For pi its accuracy is actually worse. Definitely not worth the load time. Hardcoding is the way. FloraC (talk) 06:29, 22 January 2024 (UTC)