逐步推導
S001 · implies
操作前
source roles = [qf-real-terminating-decimal-fraction, [decimal, operation, scale]]
操作後
derived = [decimal_to_fraction, no-invented-domain]
條件:無
按來源分bank:legacy raw SAFE/衍生BigInt無界,BASE Number.isInteger不偷加SAFE/百萬界。underscore operation、domain及寬/嚴keys各依本bank;原JSON完整保存。
步驟識別與依賴
規則:R68_BANK_specific_keys_operations_and_numeric_guards · 依賴:G001
S002 · calculation
操作前
Decimal ORIGINAL power10 place1 := mul(1, 10)
操作後
Decimal ORIGINAL power10 place1 = 10
條件:無
按原操作數/次序精確運算;乘/減/除明示兩操作數,legacy BigInt衍生量不重套raw SAFE界,BASE Number來源的型別/表示條件另驗,不以浮點近似湊答案。
步驟識別與依賴
規則:exact_rational_arithmetic · 依賴:G001, S001
S003 · calculation
操作前
Decimal ORIGINAL whole part times power10 := mul(8, 10)
操作後
Decimal ORIGINAL whole part times power10 = 80
條件:無
按原操作數/次序精確運算;乘/減/除明示兩操作數,legacy BigInt衍生量不重套raw SAFE界,BASE Number來源的型別/表示條件另驗,不以浮點近似湊答案。
步驟識別與依賴
規則:exact_rational_arithmetic · 依賴:G001, S002
S004 · calculation
操作前
Decimal ORIGINAL add ALL fractional digits := sum(80, 2)
操作後
Decimal ORIGINAL add ALL fractional digits = 82
條件:無
按原操作數/次序精確運算;乘/減/除明示兩操作數,legacy BigInt衍生量不重套raw SAFE界,BASE Number來源的型別/表示條件另驗,不以浮點近似湊答案。
步驟識別與依賴
規則:exact_rational_arithmetic · 依賴:G001, S003
S005 · calculation
操作前
Decimal ORIGINAL apply explicit sign := mul(1, 82)
操作後
Decimal ORIGINAL apply explicit sign = 82
條件:無
按原操作數/次序精確運算;乘/減/除明示兩操作數,legacy BigInt衍生量不重套raw SAFE界,BASE Number來源的型別/表示條件另驗,不以浮點近似湊答案。
步驟識別與依賴
規則:exact_rational_arithmetic · 依賴:G001, S004
S006 · implies
操作前
source roles = [8.2, 1, 8, 2]
操作後
derived = [82, 10]
條件:無
保留原字串與小數位數,整數部分*10^scale加全部小數digits再套符號;不經float解析,0.001的兩個前導小數0不能消掉scale。
步驟識別與依賴
規則:Real_DECIMAL_lexical_places_EXACT_integer_over_power10 · 依賴:G001, S005
S007 · calculation
操作前
Decimal exact derived fraction ORIGINAL exact numerator over nonzero denominator := div(82, 10)
操作後
Decimal exact derived fraction ORIGINAL exact numerator over nonzero denominator = 41/5
條件:無
按原操作數/次序精確運算;乘/減/除明示兩操作數,legacy BigInt衍生量不重套raw SAFE界,BASE Number來源的型別/表示條件另驗,不以浮點近似湊答案。
步驟識別與依賴
規則:exact_rational_arithmetic · 依賴:G001, S006
S008 · implies
操作前
source roles = [Decimal exact derived fraction, [82, 10]]
操作後
derived = [[41, 5], 41/5]
條件:無
BASE normalizeFraction要整數num/den且den非0,不偷加SAFE/百萬/一億界。先正den再gcd約分,零為0/1;此衍生表示不改原raw pair。
步驟識別與依賴
規則:Real_BASE_fraction_sign_gcd_normalization_NO_invented_SAFEcap · 依賴:G001, S007