Giter Site home page Giter Site logo

Comments (3)

jfbu avatar jfbu commented on August 17, 2024

This is no excuse but this bug was actually already there before my fix to #4. In fact both branches phi<1 and phi>1 use the same mathematical formula, albeit implemented differently to avoid arithmetic overflow for phi<1, but this formula is wrong for phi=1 as it simply induces N-->N+1 at the sp level....

from texdimens.

RuixiZhang42 avatar RuixiZhang42 commented on August 17, 2024

[…] but this formula is wrong for phi=1 as it simply induces N-->N+1 at the sp level....

I noticed this while I was writing the formal proof in the latex3 repo issue. I probably emphasized “formula works if and only if phi>1” way too many times (but apparently not enough, LOL). The reason that the same formula works even when 0<phi<1 is because even if (2T+1)*(psi/2) ends up equal to some other M, which is not necessarily the same N, we can still proceed to floor(M*phi)=floor(N*phi), since phi<1 now serves as a strict contraction.

When phi=1 exactly, the midpoint is exactly half way in between two integers N and N+1, and midpoint+1/2 carries us to N+1, and now we are stuck because floor((N+1)*phi)=floor(N+1)=N+1… Glad this was caught and fixed!

from texdimens.

jfbu avatar jfbu commented on August 17, 2024

well, I am a few months older than when creating the package (the \texdimenbothincm is more challenging on all accounts...). And today I tried to do about 4 things distinct at the same time, one of them being texdimens, and initially at dawn, I was only going to produce some pdf doc... then I saw that the \texdimenwithunit from a few days back had an issue, and I ended up doing a bugfix, a bugfix of the bugfix and finally a bugfix of the bugfix of the bugfix.

from texdimens.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.