-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ACER card 2 doesn't accept some valid suffixes #31
Comments
Thanks, Paul. That's some bizarre behavior. But in any case, I'm getting good at correcting lipservice problems, so I'll work on this as soon as I can. |
Thanks @nathangibson14! Yeah, it's a little strange, but I'm not too surprised -- pretty easy to get yourself in trouble by comparing floats like this. My guess is that the LHS ends up as 7.0 and the RHS ends up as 7.0000000000001 or something like that. |
I'm tempted just to make the RHS int() instead of double(), but that'd allow things we don't want to pass. I'll probably just do some character comparisons, but I'll try a few options. I bet the current implementation is system/compiler dependent, too.
…________________________________
From: Paul Romano ***@***.***>
Sent: Friday, September 3, 2021 6:40:13 PM
To: njoy/lipservice
Cc: Gibson, Nathan Andrew; Mention
Subject: [EXTERNAL] Re: [njoy/lipservice] ACER card 2 doesn't accept some valid suffixes (#31)
Thanks @nathangibson14<https://github.com/nathangibson14>! Yeah, it's a little strange, but I'm not too surprised -- pretty easy to get yourself in trouble by comparing floats like this. My guess is that the LHS ends up as 7.0 and the RHS ends up as 7.0000000000001 or something like that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#31 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAK6KQ2K5EXUKQBX7PMS37TUAFTG3ANCNFSM5DMMEPLA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
In ACER/Card2/Suff.hpp, there's an interesting check on the value that is given:
lipservice/src/lipservice/ACER/Card2/Suff.hpp
Line 22 in 1efa5e9
However, this logic doesn't work for some valid suffixes. I ran into this when trying to use .07, upon which NJOY21 complained:
The suffix .07 is just one example that doesn't work but there are a whole bunch more. A simple Python script demonstrates this:
The text was updated successfully, but these errors were encountered: