Jump to content

Math notation: rounded numbers


Danijel Gorupec

Recommended Posts

I need to present rounded numbers in my software. For example, after calculating "sqrt(2)", the software could display the result as: "1.414" (it only shows the result to a 'reasonable' precision).

 

How to mark this number as a round-off number? Is there a standard notation in mathematics?

 

From the displayed value it should be immediately visible if the result is rounded or exact. For example, consider the following two cases:

 

1/8 = 0.125 (the exact value)

sqrt(2) = 1.414 (rounded value)

 

If there is no standard way to somehow mark numbers that are rounded, I was thinking to put a dash under (or over) the last digit. Or maybe printing out the last digit in a pale color. What do you think?

Link to comment
Share on other sites

I need to present rounded numbers in my software. For example, after calculating "sqrt(2)", the software could display the result as: "1.414" (it only shows the result to a 'reasonable' precision).

 

How to mark this number as a round-off number? Is there a standard notation in mathematics?

 

From the displayed value it should be immediately visible if the result is rounded or exact. For example, consider the following two cases:

 

1/8 = 0.125 (the exact value)

sqrt(2) = 1.414 (rounded value)

 

If there is no standard way to somehow mark numbers that are rounded, I was thinking to put a dash under (or over) the last digit. Or maybe printing out the last digit in a pale color. What do you think?

 

Hmm, the only thing I can think of is that writing things in scientific notation generally implies they have been rounded.

 

There are a number of conventions for writing numbers with a margin of error, perhaps one of these might be useful:

 

You can parenthesise the values that might vary according to the uncertainty or error:

[math]1.41(4)[/math]

This would imply that it was somewhere between 1.4135 and 1.4144999... and for some reason something (such as rounding) has introduced an error which effects the last digit.

Similarly 1.4(14) would imply that there is an error that effects the last two digits (uncommon to use two digits except in high precision work).

 

You can write the error explicitly:

[math]1.414\pm 0.0002[/math]

Or if the number had been rounded before you encountered it and you did not know whether it was 1.4142, 1.4135 or 1.4144 (or anything in between) you would write:

[math]1.414\pm 0.0005[/math]

 

You can write an interval: something like [1.4135,1.4145)

 

If it's part of an equation or derivation you can use approximately equals:

[math] a = \sqrt{2} \approx 1.414[/math]

If you are indicating this in ascii it's common to use ~ or ~= as in sqrt(2) ~= 1.414

 

By convention, when you write something in scientific notation, it is implied that there is only a certain amount of information, ie.

1.414 could imply 1.41400000.....

but

[math]1.414\times 10^0[/math]

Implies nothing about the later digits (you might have rounded them, or they may not have been there).

 

This is not as strong a statement as the others. It doesn't say you have any further information, rather than saying you don't have any further information.

 

 

 

 

Your idea about a paler colour would work quite well for the case of a single piece of software (I wouldn't use dashes or dots as they are often used to imply a repeating digit), but does not make for a very good convention (hard to do on a blackboard/in pencil/in plain text etc).

 

 

 

 

More conventional is to write numbers that have infinite precision as rationals, radicals, or integers

ie. write

[math]\frac{1}{8}[/math] or [math]\pi[/math]

Thus it is implied that anything you write as a decimal has limited precision.

Link to comment
Share on other sites

Hmm, the only thing...

 

 

Thanks for your introduction... From what you said, only the proposition to somehow enclose the last digit into the parentheses is useful for my purpose. The reason for rounding in this software is simplification, and therefore only a simple indication mathods of rounded numbers are meaningfull.

 

In the mean time I had another idea... to put a very small + (plus) or - (minus) sign at the bottom right corner of a rounded number - indicating that the exact value is actually a bit greater or smaller. What do you think?

 

If such indication is alreday used for an other important purpose, maybe it is not a good idea. Also it is the question of monitor resolution, how small +/- sign can I render.

Link to comment
Share on other sites

In the mean time I had another idea... to put a very small + (plus) or - (minus) sign at the bottom right corner of a rounded number - indicating that the exact value is actually a bit greater or smaller. What do you think?

 

Not a bad idea. A ~ to the left would be another good way of doing that.

[math] \begin{array}{r} 3.2 \\ {\sim}4.1\\ 1.4 \end{array} [/math]

Or a small one somewhere in the box

Link to comment
Share on other sites

Not a bad idea. A ~ to the left would be another good way of doing that.

[math] \begin{array}{r} 3.2 \\ {\sim}4.1\\ 1.4 \end{array} [/math]

Or a small one somewhere in the box

 

Whoooow!

 

Now you got me thinking about three nice posibilities:

 

- tilde sign over the last digit

- tilde sign under the last digit

- small plus/minus signs at the bottom right corner of the last digit

 

First two propositions are very easy to implement and very intuitive to understand. The third proposition, on the other hand, gives additional info about the exact value (wheter it is smaller or greater).

 

Most certainly I will implement one of these three propositions. If anybody else wants to vote, please do so (It is to be used in Math-o-mir software: http://gorupec.awardspace.com/mathomir.html )

Link to comment
Share on other sites

Whoooow!

 

Now you got me thinking about three nice posibilities:

 

- tilde sign over the last digit

- tilde sign under the last digit

- small plus/minus signs at the bottom right corner of the last digit

 

First two propositions are very easy to implement and very intuitive to understand. The third proposition, on the other hand, gives additional info about the exact value (wheter it is smaller or greater).

 

Most certainly I will implement one of these three propositions. If anybody else wants to vote, please do so (It is to be used in Math-o-mir software: http://gorupec.award...m/mathomir.html )

Another common notation for displaying some digits of a number is to use an elipsis, 1.414… (ascii character 133 for a single width version in most monospace fonts)

This is the convention when you are storing more digits, but only displaying a few. It more frequently implies truncation (1.55555 would be truncated to 1.55…), but I have seen it for both.

One thing to be careful of is that it is also used to imply a repeating digit/series of digits, or an infinite series (ie. 1 + 2 + 3 + ... would be the sum of all numbers from 1 to infinity)

 

 

Interesting software.

Have you heard of/looked at LaTeX (or lyx)?

Latex is very much the traditional software for thist type of thing (This forum accepts latex code between [ math ] and [ / math ] tags without the spaces) if you want to try it out.) although it is more focused on good presentation than speed.

I didn't download it, but I imagine it will be a lot more popular if you make it accept latex commands if you haven't already.

Link to comment
Share on other sites

I agree with all the replies - but would highlight one point of Mr Hat's - in my experience an elipsis serves the same purpose as dots above the number -ie a repeating digit or set of digits BUT NOT an unknown quantity. A tilde to the left or an approx equals [imath] \approx [/imath] with a foot note to explain would be my prefered course of action

Link to comment
Share on other sites

I agree with all the replies - but would highlight one point of Mr Hat's - in my experience an elipsis serves the same purpose as dots above the number -ie a repeating digit or set of digits BUT NOT an unknown quantity.

 

This depends very much on the context.

If it were on a number that is part of a larger expression including things like square root signs etc. I would almost always read it as some indication of a pattern that repeats.

If it were on a number that is part of a computerised table (like a resizable spreadsheet), or on some kind of interactive diagram, I would almost always read it as a truncated or rounded decimal. I was thinking of this primarily in relation to graphics/engineering/computer programming/computer game type software I've encountered rather than mathematical notation..

For other cases (like a printed table, or static diagram, or a number on its own) it would be somewhat ambiguous, I'd lean towards the former if I were doing maths, the latter if it were something related to application.

 

I agree with imatfaal that the tilde to the left is probably the best. It is certainly the most in keeping with (mathematical notation) conventions.

Link to comment
Share on other sites

This depends very much on the context.

If it were on a number that is part of a larger expression including things like square root signs etc. I would almost always read it as some indication of a pattern that repeats.

If it were on a number that is part of a computerised table (like a resizable spreadsheet), or on some kind of interactive diagram, I would almost always read it as a truncated or rounded decimal. I was thinking of this primarily in relation to graphics/engineering/computer programming/computer game type software I've encountered rather than mathematical notation..

For other cases (like a printed table, or static diagram, or a number on its own) it would be somewhat ambiguous, I'd lean towards the former if I were doing maths, the latter if it were something related to application.

 

I agree with imatfaal that the tilde to the left is probably the best. It is certainly the most in keeping with (mathematical notation) conventions.

 

You're correct - the dots/ellipsis can represent many things depending on context (many of which I hadn't considered) but the about/approx sign is fairly consistent. why flirt with being ambiguous? - go for the conventional usage that will not be misinterpreted.

 

However for a scientific audience go all the way back to Mr S Hat's first post and use the uncertainty/erorr in parentheses

Edited by imatfaal
Link to comment
Share on other sites

This is not really a mathematics question. Unless otheerwise stated explicitly pure mathematicians use exact values and rarely use decimal representations.

 

Engineers and physicists almost always think in terms of "significant figures" and decimal representations are assumed to be rounded using the usual conventions.

In very precise work figures are accompanied by explicit error bounds.

 

A "~" in front of a number is interpreted as "approximately equal to" but carries no explicit error bound. As this is a common notation, an alternate use would be likely to lead to confusion.

 

I would suggest sticking with the usual conventions and notation as understood in the engineering and physics community. Otherwise confusion is likely. That is your primary audience anyway. The system works. It isn't broken. There is no need to fix it.

 

 

Link to comment
Share on other sites

Thanks for all your comments...

 

I agree that using tilde in front of a number is mathematicaly the most correct way to represent a non-exact value. There are however practical disadvantages of this notation:

 

- representing negative numbers seems awkward: ~-10.3

- at low-resolution montior, or small font, the tilde sign may look like the minus sign.

- adding the tilde sign in front of a number affects rendering (typesetting) heavily as longer numbers affect alignment

- the tilde sign in front of a number does not explain the reason of non-exactness.

 

Therefore, in my software, I will probably opt to use the "tilde below the last digit" to represent non-exactness because of rounding. (I will print this tilde in a pale color to generate less distraction).

 

One general note: math notation is not perfect (for example, Leibnitz's calculus notation). As a result, I am not too afraid to 'expand' the notation in a new direction. After all, mathematicians are bright people and should be able to learn few exceptions when using particular software.

 

 

Have you heard of/looked at LaTeX (or lyx)?

Latex is very much the traditional software for thist type of thing (This forum accepts latex code between [ math ] and [ / math ] tags without the spaces) if you want to try it out.) although it is more focused on good presentation than speed.

I didn't download it, but I imagine it will be a lot more popular if you make it accept latex commands if you haven't already.

 

Of course I know the LaTeX.... As you said, the LaTeX is designed for publishig, while my software is designed to type personal notes rapidly.

Some LaTeX commands are implemented, but it is not possible to implement the full set due to different software philosophy.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.