Post Reply 
a b/c unexpected function
09-03-2020, 08:30 PM
Post: #7
RE: a b/c unexpected function
(09-03-2020 06:21 PM)Joe Horn Wrote:  PDQ is the algorithm used by the second (and sometimes third) press. Its accuracy is controlled by the current display mode. For example, try Fixed 6 mode and see 0.000001 displayed as 1/500001 ...

What happens if mode is FIX 5 ?

For x = 1/10^6, PDQ'd fraction numerator cannot be more than 1

1/den - x < eps       → den > 1/(x + eps)

lua> x = 1/10^6
lua> function min_den(eps) return floor(1/(x + eps)) + 1 end
lua> min_den(1e-7), min_den(1e-6), min_den(1e-5)

909091       500001       90910

Although 1/90910 - x < 1e-5, we also have x - 0 < 1e-5

Does it meant PDQ'd 1e-6, FIX 5, should return the "simpler" 0/1 instead ?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
a b/c unexpected function - celltx - 09-03-2020, 05:10 PM
RE: a b/c unexpected function - Joe Horn - 09-03-2020, 06:21 PM
RE: a b/c unexpected function - Albert Chan - 09-03-2020 08:30 PM
RE: a b/c unexpected function - Joe Horn - 09-04-2020, 12:41 AM
RE: a b/c unexpected function - celltx - 09-03-2020, 07:01 PM
RE: a b/c unexpected function - Joe Horn - 09-03-2020, 07:29 PM
RE: a b/c unexpected function - celltx - 09-03-2020, 08:13 PM
RE: a b/c unexpected function - ijabbott - 09-04-2020, 07:48 AM
RE: a b/c unexpected function - celltx - 09-04-2020, 04:23 PM
RE: a b/c unexpected function - Joe Horn - 09-04-2020, 05:24 PM



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