A new AC fare?

Old Mar 22, 2018, 4:59 pm
  #1  
Original Poster
 
Join Date: Jun 2008
Location: YYT
Programs: Altitude SEMM
Posts: 412
A new AC fare?


Have booked many flights, but have not seen this one before. Sadly, I was unable to complete the booking. Hey, hey, goodbye.
Livyer is offline  
Old Mar 22, 2018, 5:06 pm
  #2  
 
Join Date: Dec 2011
Location: YYZ
Programs: AC SEMM / HH Diamond
Posts: 3,150
That's a NoGo fare class
24left and Yhztraveller like this.
canopus27 is offline  
Old Mar 22, 2018, 5:12 pm
  #3  
FlyerTalk Evangelist
 
Join Date: Jun 2003
Location: YYC
Posts: 23,789
I like NaNs. Not sure how zero plus zero ended up as a NaN though.
Stranger is offline  
Old Mar 22, 2018, 5:39 pm
  #4  
 
Join Date: Jan 2017
Location: Halifax
Programs: AC SE100K, Marriott Lifetime Platinum Elite. NEXUS
Posts: 4,561
Your account has been suspended for suspicious activity. Nature of suspicious activity: use of advanced mathematics and non-real numbers
RangerNS is offline  
Old Mar 22, 2018, 5:45 pm
  #5  
 
Join Date: Dec 2005
Location: YYZ most of the time
Programs: AC SE100K MM, Princess Elite
Posts: 3,921
Originally Posted by Stranger
I like NaNs. Not sure how zero plus zero ended up as a NaN though.
if you have any device with Siri, ask her "What is zero divided by zero". Her answer will likely explain this phenomenon
Yhztraveller and ffsim like this.
yyz_atc_qq is offline  
Old Mar 22, 2018, 6:12 pm
  #6  
FlyerTalk Evangelist
 
Join Date: Jun 2003
Location: YYC
Posts: 23,789
Originally Posted by yyz_atc_qq
if you have any device with Siri, ask her "What is zero divided by zero". Her answer will likely explain this phenomenon
My point was, even siri will tell you that zero plus zero won't end up as NaN. Divided, obviously, no need for siri for that...

Bust ask siri about the l'Hospital rule.
Stranger is offline  
Old Mar 22, 2018, 6:24 pm
  #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
Originally Posted by yyz_atc_qq
if you have any device with Siri, ask her "What is zero divided by zero". Her answer will likely explain this phenomenon
For anyone using the wrong platform


24left, longtimeflyin and rehoult like this.
ffsim is offline  
Old Mar 22, 2018, 6:31 pm
  #8  
FlyerTalk Evangelist
 
Join Date: Jun 2003
Location: YYC
Posts: 23,789
Originally Posted by ffsim


For anyone using the wrong platform
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.
Stranger is offline  
Old Mar 22, 2018, 6:34 pm
  #9  
 
Join Date: Jan 2016
Location: YYZ
Programs: FOTSG Tangerine Ex E35k (AC)
Posts: 5,612
Originally Posted by Stranger
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.
NaN can also be a string. Like “0” as an int all return a JS NaN if memory serves. Basically if AC had decent developers, testers or perhaps even some unit tests this wouldn’t happen.

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.
jc94 is offline  
Old Mar 22, 2018, 6:40 pm
  #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
Originally Posted by Stranger
Not really. Computers will yield a NaN if they strictly face 0/0...
Originally Posted by jc94
NaN can also be a string.
Y’all are no fun.
ffsim is offline  
Old Mar 22, 2018, 6:41 pm
  #11  
A FlyerTalk Posting Legend
 
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, BA Gold, SQ Silver, Bonvoy Tit LTG, Hyatt Glob, HH Diamond
Posts: 44,296
I think the real interesting question is where can I buy a $0 fare?
canadiancow is online now  
Old Mar 22, 2018, 6:41 pm
  #12  
Suspended
 
Join Date: Sep 2014
Programs: AC SE100K-1MM, NH, DL, AA, BA, Global Entry/Nexus, APEC..
Posts: 18,877
Originally Posted by ffsim
Y’all are no fun.
I wonder if they missed your intent.
24left is offline  
Old Mar 22, 2018, 7:08 pm
  #13  
FlyerTalk Evangelist
 
Join Date: Jun 2003
Location: YYC
Posts: 23,789
Originally Posted by 24left
I wonder if they missed your intent.
His is with integers.
Stranger is offline  
Old Mar 22, 2018, 7:44 pm
  #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


maradori is offline  
Old Mar 22, 2018, 8:55 pm
  #15  
 
Join Date: Apr 2016
Location: YYZ
Programs: TK *G
Posts: 3,099
Originally Posted by maradori
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


+1. Likely to be a type error. Guess AC hired a intern who only worked with C/Java in school?
songsc is offline  

Thread Tools
Search this Thread

Contact Us - Manage Preferences - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.