A new AC fare?
#5
Join Date: Dec 2005
Location: YYZ most of the time
Programs: AC SE100K MM, Princess Elite
Posts: 3,921
#6
FlyerTalk Evangelist
Join Date: Jun 2003
Location: YYC
Posts: 23,789
Bust ask siri about the l'Hospital rule.
#7
Join Date: Oct 2009
Location: YUL
Programs: AC SE (*A Gold), Bonvoy Platinum Elite, Hilton Gold, Amex Platinum / AP Reserve, NEXUS, Global Entry
Posts: 5,691
#8
FlyerTalk Evangelist
Join Date: Jun 2003
Location: YYC
Posts: 23,789
Not really. Computers will yield a NaN if they strictly face 0/0, or if the answer falls outside the range of their floating point format. As to an answer being indeterminate that never makes sense physically, except if the question made no sense in the first place. Otherwise a sensible limit should exist.
None of which explaining why AC's computers yield a NaN when adding 0+0. Which in any decent family and for any reasonable computer is always 0.
None of which explaining why AC's computers yield a NaN when adding 0+0. Which in any decent family and for any reasonable computer is always 0.
#9
Join Date: Jan 2016
Location: YYZ
Programs: FOTSG Tangerine Ex E35k (AC)
Posts: 5,612
Not really. Computers will yield a NaN if they strictly face 0/0, or if the answer falls outside the range of their floating point format. As to an answer being indeterminate that never makes sense physically, except if the question made no sense in the first place. Otherwise a sensible limit should exist.
None of which explaining why AC's computers yield a NaN when adding 0+0. Which in any decent family and for any reasonable computer is always 0.
None of which explaining why AC's computers yield a NaN when adding 0+0. Which in any decent family and for any reasonable computer is always 0.
And by happen I mean make it into production. This should be caught on dev or Test. I’m assuming AC have at least one non live environment.
#10
Join Date: Oct 2009
Location: YUL
Programs: AC SE (*A Gold), Bonvoy Platinum Elite, Hilton Gold, Amex Platinum / AP Reserve, NEXUS, Global Entry
Posts: 5,691
#14
Join Date: Jun 2009
Location: YYZ, SFO
Programs: AS 100K, UA*S, IHG Plat, Marriott Titanium, Hilton Diamond | Formerly: AC Super Elite
Posts: 2,476
Had a similar issue at work a few weeks ago - basically our app was formatting a price but the API returned "Price not available" so yeah .... we were showing $undefined.NaN or something ridiculous like that
If you look at the screenshot, you'll see the fare and taxes are listed as "0.0" which is a bit unusual and might help explain what's going on
Also, as a proof of concept, you can do this in your browser's javascript console
> "0.0" + "0.0"
< "0.00.0"
> Number("0.0" + "0.0")
< NaN
....
And guess what I just saw in my console
If you look at the screenshot, you'll see the fare and taxes are listed as "0.0" which is a bit unusual and might help explain what's going on
Also, as a proof of concept, you can do this in your browser's javascript console
> "0.0" + "0.0"
< "0.00.0"
> Number("0.0" + "0.0")
< NaN
....
And guess what I just saw in my console
#15
Join Date: Apr 2016
Location: YYZ
Programs: TK *G
Posts: 3,099
Had a similar issue at work a few weeks ago - basically our app was formatting a price but the API returned "Price not available" so yeah .... we were showing $undefined.NaN or something ridiculous like that
If you look at the screenshot, you'll see the fare and taxes are listed as "0.0" which is a bit unusual and might help explain what's going on
Also, as a proof of concept, you can do this in your browser's javascript console
> "0.0" + "0.0"
< "0.00.0"
> Number("0.0" + "0.0")
< NaN
....
And guess what I just saw in my console
If you look at the screenshot, you'll see the fare and taxes are listed as "0.0" which is a bit unusual and might help explain what's going on
Also, as a proof of concept, you can do this in your browser's javascript console
> "0.0" + "0.0"
< "0.00.0"
> Number("0.0" + "0.0")
< NaN
....
And guess what I just saw in my console