24
$\begingroup$

For those who may be unfamiliar with IEEE 754, it is the standard that the vast majority of computers use to store floating-point numbers. There are about 100 questions on this site about converting numbers to IEEE 754 format. (I realize that, on a site with 300k questions, this is a very small number, but even so...)

I would like to suggest that questions asking for help on converting a number to IEEE 754 form should be off topic. Why? My reasons are as follows:

  • Questions asking about high-level concepts of IEEE 754 would be a better fit on Programmers or SO.
  • Questions asking "how do I convert [some particular number] to IEEE 754" are typically low-effort, hit-and-run questions. Also, there are numerous online tools for performing this conversion.
  • IEEE 754 conversion isn't really a mathematical topic (unlike ); rather, it's about adhering to a particular industry specification.

If this gains support, then the appropriate response to a question asking to convert some number into IEEE 754 format would be closed as "not about math, as defined in the help center."

$\endgroup$
7
  • 1
    $\begingroup$ You could also vote to migrate. $\endgroup$
    – Pedro Mod
    Feb 13, 2015 at 3:24
  • 2
    $\begingroup$ @PedroTamaroff True, but only if the question is of good enough quality. $\endgroup$
    – apnorton
    Feb 13, 2015 at 3:25
  • 20
    $\begingroup$ I have no strong opinions about questions of the type "convert this number to IEEE 754", but OTOH I would consider "is there a way to rewrite this formula that avoids catastrophic cancellation when using IEEE 754?" very much on-topic. $\endgroup$
    – user7530
    Feb 13, 2015 at 6:07
  • $\begingroup$ Wow. A lot of these questions are really gross. Why do people want to convert from decimal to binary floating-point by hand in the first place? $\endgroup$
    – tmyklebu
    Feb 16, 2015 at 20:28
  • $\begingroup$ @tmyklebu If you can do it by hand, then you'll get a feel for how large a float is just by looking at it in hex. This could be useful for debugging, etc. $\endgroup$
    – apnorton
    Feb 16, 2015 at 20:58
  • 1
    $\begingroup$ @anorton: I write numerical software. I never do these conversions by hand. This is just an exercise in causing pain. $\endgroup$
    – tmyklebu
    Feb 16, 2015 at 21:23
  • 2
    $\begingroup$ Hopefully people won't also think that hand-coding to ISO 10918 (JPEG) is on-topic on the basis that Huffman coding is mathematics, but you never know, IEEE 754 could be the thin end of a wedge ;-) $\endgroup$ Feb 20, 2015 at 3:17

2 Answers 2

21
$\begingroup$

If this question merely regards question of the form "How do I convert $X$ to IEEE 754", then we should just write a question which solves the general case (and stick in this list), and close all future questions as duplicates of that one. This avoids duplicated effort, gives an unobjectionable reason to close such questions, and even points the posters of such questions to a suitable resource.

More generally, I think, on principle, questions regarding particular representation floating point numbers are on-topic - mathematical expertise could often be helpful to answering such questions, especially for more conceptual questions where "industry standard" can be interpreted as "particular instance of more general idea". However, given that other sites are almost surely better equipped to answer such questions (since I doubt a as many regulars here know or care too much about a rigid standard), it would be appropriate to, when a good question on this topic arises, leave a comment suggesting the author post the question on a better SE site or to flag for migration.

(Of course, for bad questions, there is no need to declare the topic "off-topic". Low-effort hit-and-run questions are already off-topic, so it's not like we're accomplishing anything by making them double-off-topic - no matter what our help center says, we get plenty of bad questions of every topic.)

$\endgroup$
4
  • 5
    $\begingroup$ For single precision, this looks like a canonical answer. $\endgroup$
    – user147263
    Feb 13, 2015 at 4:12
  • 2
    $\begingroup$ Question: are we talking questions about IEEE 754 as such OR questions about numerical mathematics, conditioning, stability or maybe just machine representation and/or precision that happen to refer to 754 because that's what most textbooks introduce first? In my VERY humble opinion, even something simple as the proof that machine epsilon is such and such belongs here and not on x, where x is any SE site where proofs are uncommon. If we are talking about 754 as such (say, from Comp Arch 101, before they tell you - e.g. in Sci Comp - how bad you've actually got it) it makes sense, I guess $\endgroup$ Feb 13, 2015 at 19:20
  • 2
    $\begingroup$ @TobiaTesan I was thinking only about IEEE 754 (or really any specific standard) - certainly questions about numerical stability or on the ideas behind machine representations are well at home here (or anything which really is looking for proof). As I think such questions are not off-topic so much as potentially better suited to a better site, there is a judgement to make - commenting or flagging for the question to be moved are options to consider, but, of course, only helpful if the other site is actually better equipped. This, of course, can only be determined on an individual basis. $\endgroup$ Feb 14, 2015 at 0:21
  • 5
    $\begingroup$ Amen! Closing arithmetic questions for being off-topic makes math.SE look very stupid. If the question is too specifically tied to a specific programming language (assembly, C++, Java, whatever) then "off-topic" might actually make sense. $\endgroup$ Feb 17, 2015 at 22:41
2
$\begingroup$

It can be done but it would be a bad idea, one that contributes to a negative perception of Math.StackExchange.

  • "Questions asking about high-level concepts of IEEE 754 would be a better fit on Programmers or SO." That's what migration is for. You would migrate a question on Java class inheritance, right? So a question on how the latest Intel chip handles IEEE 754 should likewise get migrated.
  • "Questions asking "how do I convert [some particular number] to IEEE 754" are typically low-effort, hit-and-run questions. Also, there are numerous online tools for performing this conversion." Yes, even Google can do it (I just asked it to convert pi to single precision floating point and it replied 0f40490FDB). So just downvote the question and post a comment giving a link to an online converter tool.
  • "IEEE 754 conversion isn't really a mathematical topic ...; rather, it's about adhering to a particular industry specification." Would you say the same about converting negative integers to double word two's complement? Maybe we'll have to agree to disagree on this one.
$\endgroup$
2
  • $\begingroup$ "Would you say the same about converting negative integers to double word two's complement?" Yes, I would. I'd say something much worse about both "convert to IEEE 754" and "convert to two's complement," namely that whoever the teacher is is bad at his job. Doing these conversions by hand is an exercise in pointless arithmetic that cannot help to reinforce the concepts in play. $\endgroup$
    – tmyklebu
    Feb 22, 2015 at 1:07
  • 2
    $\begingroup$ @tmyklebu: On the contrary, doing a few convert to two’s complement exercises by hand is genuinely instructive for quite a few students — those who need to get their hands dirty in order really to see what’s going on. And the fact that in practice one would normally use a tool is largely irrelevant. $\endgroup$ Feb 24, 2015 at 3:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .