Post Reply 
(11C) Arithmetic with Fractions
09-17-2018, 06:44 PM
Post: #12
RE: (11C) Arithmetic with Fractions
Just want to clarify, Kahan's algorithm basically mechanized below steps:

G = gcd(12345648, 6357263) = 181

M/N = 1234567/12345648 - 635720/6357263
= (6820 G + 147) / (68208 G) - (3512 G + 48) / (35123 G)
= (35123 G *(6820 G + 147) - 68208 G *(3512 G + 48)) / (68208 * 35123 * G^2)
= ((6820*35123 - 3512*68208) G + (147*35123 - 68208*48)) / (68208 * 35123 * G)
= (-7636 G + 1889097) / (68208 * 35123 * G)
= (-7636 G + 10437 G) / (68208 * 35123 * G)
= 2,801 / 2,395,669,584
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Arithmetic with Fractions - Gamo - 09-15-2018, 07:02 AM
RE: (11C) Arithmetic with Fractions - Gamo - 09-17-2018, 03:47 AM
RE: (11C) Arithmetic with Fractions - Gamo - 09-17-2018, 09:40 AM
RE: (11C) Arithmetic with Fractions - Albert Chan - 09-17-2018 06:44 PM
RE: (11C) Arithmetic with Fractions - Gamo - 09-22-2018, 06:33 AM



User(s) browsing this thread: 1 Guest(s)