This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: A misleading url in 'Floating Point Arithmetic' page
Type: Stage: resolved
Components: Documentation Versions: Python 3.10
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Akuli, Dennis Sweeney, docs@python, eric.smith, hanhantw, xiaox55066
Priority: normal Keywords:

Created on 2021-10-27 05:39 by hanhantw, last changed 2022-04-11 14:59 by admin. This issue is now closed.

File name Uploaded Description Edit
截圖 2021-10-27 下午5.02.02.png hanhantw, 2021-10-27 09:04
Messages (16)
msg405070 - (view) Author: Sonia (hanhantw) Date: 2021-10-27 05:39
The url of [The Perils of Floating Point]( seems a bit weird in the page It redirects me to a webpage that sells dugs. Not sure if the resource was meant to find this:
msg405072 - (view) Author: Dennis Sweeney (Dennis Sweeney) * (Python committer) Date: 2021-10-27 07:07
I was unable to replicate this. I see the correct article 
"The Perils of Floating Point" at Is the site still incorrect for you, or did the Lahey site fix the issue?
msg405077 - (view) Author: Sonia (hanhantw) Date: 2021-10-27 09:01
I was redirect to 
so is this my internet problem?
msg405078 - (view) Author: Sonia (hanhantw) Date: 2021-10-27 09:04
It shows the drug ad slogan even with the google search result.
I searched 'The Perils of Floating Point lahey'
msg405097 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-10-27 13:41
The link on the doc page also works for me, sending me to

I think the problem is with @hanhantw's browser or ISP, or similar. I'm going to close this.
msg405146 - (view) Author: Sonia (hanhantw) Date: 2021-10-28 02:53
msg407807 - (view) Author: Akuli (Akuli) Date: 2021-12-06 13:59
To me, it redirects or doesn't redirect to the drugs site, depending on what Accept-Language header your browser sends. And when the redirecting happens, the site is in chinese. (I don't speak chinese, and I don't know why my browser is sending zh-CN in Accept-Language.)

akuli@akuli-desktop:~$ curl -s -H 'Accept-Language: en-US,en;q=0.9' | head
<title>Lahey - Floating point</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="scripts\jrs.css">


akuli@akuli-desktop:~$ curl -s -H 'Accept-Language: en-US,en;q=0.9,zh-CN;q=0.4' | head
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="">here</a></body>

Incognito mode worked for me, because it sends `Accept-Language: en-US,en;q=0.9` without any additional languages.
msg407808 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-12-06 14:03
That's interesting. I see the same behavior.

So this seems to be a problem on I'll see if I can report it to them.
msg407883 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-12-07 00:14
I notified, and it looks like the behavior is now normal (at least, it looks okay by testing with the curl commands). Could someone who say this problem in a browser please double-check?
msg407903 - (view) Author: Akuli (Akuli) Date: 2021-12-07 09:33
Thanks! Works for me in browser now.
msg407913 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-12-07 11:04
@Akuli: thanks for checking. And thanks so much for the awesome debugging with curl: that was the key to solving the problem.

I didn't hear back from what the problem was, but I'd sure be curious to know!
msg413569 - (view) Author: 肖小小 (xiaox55066) Date: 2022-02-20 08:42
Thanks! Works for me in browser now.
msg413570 - (view) Author: 肖小小 (xiaox55066) Date: 2022-02-20 08:43
It shows the drug ad slogan even with the google search result.
I searched 'The Perils of Floating Point lahey'
msg413571 - (view) Author: 肖小小 (xiaox55066) Date: 2022-02-20 08:51
I was redirect to
so is this my internet problem?
msg413572 - (view) Author: 肖小小 (xiaox55066) Date: 2022-02-20 08:51
It shows the drug ad slogan even with the google search result. searched 'The Perils of Floating Point lahey'
msg413576 - (view) Author: Akuli (Akuli) Date: 2022-02-20 09:46
If you still have the problem, can you show us what headers your browser sends to websites? You can see that by running in Python:

    import socket
    print(socket.create_server(('', 12345)).accept()[0].recv(1024).decode())

and then going to http://localhost:12345/ in your browser.

I'm especially interested in the line that starts with Accept-Language. For me, the site now works, and my Accept-Language header is:

    Accept-Language: en-US,en;q=0.9,fi;q=0.8,sv;q=0.7,pt;q=0.6,it;q=0.5,zh-CN;q=0.4,zh;q=0.3
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89783
2022-02-20 09:46:24Akulisetmessages: + msg413576
2022-02-20 08:51:27xiaox55066setmessages: + msg413572
2022-02-20 08:51:01xiaox55066setmessages: + msg413571
2022-02-20 08:43:03xiaox55066setmessages: + msg413570
2022-02-20 08:42:36xiaox55066setnosy: + xiaox55066
messages: + msg413569
2021-12-07 11:04:33eric.smithsetstatus: open -> closed
resolution: third party
messages: + msg407913

stage: resolved
2021-12-07 09:33:47Akulisetmessages: + msg407903
2021-12-07 00:14:25eric.smithsetmessages: + msg407883
2021-12-06 14:12:13eric.smithsetstatus: closed -> open
resolution: works for me -> (no value)
stage: resolved -> (no value)
2021-12-06 14:03:59eric.smithsetmessages: + msg407808
2021-12-06 13:59:39Akulisetnosy: + Akuli
messages: + msg407807
2021-10-28 02:53:34hanhantwsetmessages: + msg405146
2021-10-27 13:41:42eric.smithsetstatus: open -> closed

nosy: + eric.smith
messages: + msg405097

resolution: works for me
stage: resolved
2021-10-27 09:04:48hanhantwsetfiles: + 截圖 2021-10-27 下午5.02.02.png

messages: + msg405078
2021-10-27 09:01:00hanhantwsetmessages: + msg405077
2021-10-27 07:07:58Dennis Sweeneysetnosy: + Dennis Sweeney, docs@python
messages: + msg405072

assignee: docs@python
components: + Documentation
2021-10-27 05:39:20hanhantwcreate