- #1
- 28,959
- 4,264
See https://www.physicsforums.com/showthread.php?t=486869
Both pictures identical, but when you click on them code is different.
Both pictures identical, but when you click on them code is different.
Borek said:By my book it is a bug - if the code is invalid it should not yield correct, but different image.
I guess image was first generated OK, then message was edited and wrong code was entered, so new image was not generated, but old one WAS NOT DELETED.
There is a subtle misfeature here; it is the same one that forces us to refresh while generating a post that contains [ tex ] blocks. Whether this is a bug worthy of correction is a matter of opinion. Your book is not the same book that the owner of this site uses to make that distinction.Borek said:By my book it is a bug - if the code is invalid it should not yield correct, but different image.
D H said:Making software do the right thing given proper input is hard. For the most part, this site does do just that. (Occasionally we do get some weird database errors; those truly are bugs.) Making software do the right thing given improper input is extremely hard, an order of magnitude harder / more time-consuming compared to making software merely do the right thing given proper input.
D H said:Is the correction offered by I like Serena in post #3 "correct"?
[tex](Actual yield)/(Theoretical yield) * 100\%[/tex]
My opinion: Yech. No space before yield, and the spacing in actualyield looks a lot more like the product of a, c, t, u, a, l, ... rather than words. Much better is
[tex]\mbox{(Actual yield)}/\mbox{(Theoretical yield)} * 100\%[/tex]
Or just (Actual yield)(Theoretical yield)} * 100%.
If only it were that simple. Even if it was that simple, that still represents a huge cost overhead.I like Serena said:In short, it takes 2-3 times as much code to handle improper input.
D H said:Making software do the right thing given proper input is hard. For the most part, this site does do just that. (Occasionally we do get some weird database errors; those truly are bugs.) Making software do the right thing given improper input is extremely hard, an order of magnitude harder / more time-consuming compared to making software merely do the right thing given proper input.
D H said:Right, but you are doing it for profit. I also write scientific software, and I do do my best to make it foolproof. There is however a huge cost in doing so -- and even then I care a whole lot more about whether our software works correctly given correct input than I care about how our software works in the face of goofy input.
Greg is doing this for fun, and mostly for free. If physicsforums.com did generate all of or even a significant fraction of Greg's income we would have a significantly increased case here.
D H said:If only it were that simple. Even if it was that simple, that still represents a huge cost overhead.
There are times when the even recognizing that the input is improper is extremely hard, if not downright impossible. Some examples:
- Having the compiler determine whether a program halts. First off, there's the halting problem that makes answering this question a bit more than problematic. Secondly, what if the program isn't supposed to halt? Is halting an error? (In many cases, yes it is.)
- Having the compiler determine whether a variable is assigned a value before the variable is accessed. This is equivalent to the halting problem.
- Having a C compiler make sense of i = 5; printf ("%d\n", (i++)*i); The result might be to print 36. Or it might print 25, or 30, or 1234567890. Then it might result in a call reformat_hard_drive() or even eject_nasal_demons(). All are valid responses to such nonsense.
There is no way to anticipate all the goofy ways users can get things wrong. We can try, and trying is a "good thing", but there are no guarantees.
Borek said:Allocation of resources devoted to making program foolproof probably depends on the intended audience and their expected level of computer competence. I must assume I wrote for complete idiots Even then I am sometimes overestimating their knowledge - https://www.physicsforums.com/showthread.php?p=3184107#post3184107
I like Serena said:Nice one .
So did the customer get his money back?
LaTeX is a typesetting system used for creating professional-looking documents, especially in the fields of mathematics, computer science, and other sciences. It is popular among scientists because it allows for precise formatting and handling of equations and symbols.
A LaTeX bug refers to an error or unexpected behavior in the LaTeX software that causes issues with document formatting or compiling. These bugs can be caused by coding errors, compatibility issues, or other technical problems.
If you encounter a LaTeX bug, you can report it to the developers through their official website or forums. Before reporting a bug, it is important to provide a clear and concise description of the issue, along with any necessary code or files that can help the developers reproduce the bug.
LaTeX bugs are typically fixed by the developers through software updates. These updates may be released periodically or on an as-needed basis, depending on the severity of the bug. Users can check for updates and download them to fix any known bugs in their LaTeX software.
If you are familiar with coding and have the necessary technical skills, you may be able to fix a LaTeX bug yourself. However, it is recommended to report the bug to the developers and let them handle the fix, as they have a better understanding of the software and its code.