Subject: Re: [quicwg/base-drafts] Alternative largest reference algorithm (#1904)

From: afrind <[email-masked]>
Date: Fri, 11 Jan 2019 13:38:44 -0800

I'd like to make it a requirement that the algorithm produce an error if the encoder sent a value that is not possible if it were following the rules in the spec.  Example per the discussion in #2112:

MaxEntries = 10
TotalNumberOfInserts (decoder_base) = 2
WireLR = 18

This algorithm returns 17.  What is the guidance to convert this to an error?  Is it:

```
if lr > max_value:
  Error
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1904#issuecomment-453665134

---

From: Bence Béky <[email-masked]>
Date: Fri, 11 Jan 2019 17:41:54 -0800

> This algorithm returns 17. What is the guidance to convert this to an error? Is it:

I'm with you.  See issue 2249.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1904#issuecomment-453708671

---

From: Martin Thomson <[email-masked]>
Date: Tue, 15 Jan 2019 15:36:09 -0800

If you want errors on underflow:

```
    if lr > max_value and lr >= full_range:
        lr -= full_range
```
becomes
```
    if lr > max_value:
        if lr < full_range:
            throw!
        lr -= full_range
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1904#issuecomment-454593235