# HG changeset patch # User Claus Gittinger # Date 1559866803 -7200 # Node ID 96315a6ab1f3efcf1a105a6d96835bf0ecfdbbf0 # Parent f748df2830098624bb260e4d12643f1691651d46 #DOCUMENTATION by cg class: LimitedPrecisionReal comment/format in: #differenceFromFraction: #productFromFraction: #sumFromFraction: diff -r f748df283009 -r 96315a6ab1f3 LimitedPrecisionReal.st --- a/LimitedPrecisionReal.st Fri Jun 07 02:18:48 2019 +0200 +++ b/LimitedPrecisionReal.st Fri Jun 07 02:20:03 2019 +0200 @@ -1229,18 +1229,22 @@ !LimitedPrecisionReal methodsFor:'double dispatching'! differenceFromFraction:aFraction - "sent when a fraction does not know how to subtract the receiver, a float" + "sent when a fraction does not know how to subtract the receiver" |d| d := aFraction denominator. ^ (aFraction numerator - (self * d)) / d + + "Modified (comment): / 07-06-2019 / 02:19:52 / Claus Gittinger" ! productFromFraction:aFraction - "sent when a fraction does not know how to multiply the receiver, a float" + "sent when a fraction does not know how to multiply the receiver" ^ self * aFraction numerator / aFraction denominator + + "Modified (comment): / 07-06-2019 / 02:19:47 / Claus Gittinger" ! quotientFromFraction:aFraction @@ -1251,12 +1255,14 @@ ! sumFromFraction:aFraction - "sent when a fraction does not know how to add the receiver, a float" + "sent when a fraction does not know how to add the receiver" |d| d := aFraction denominator. ^ (self * d + aFraction numerator) / d + + "Modified (comment): / 07-06-2019 / 02:19:35 / Claus Gittinger" ! sumFromTimestamp:aTimestamp