Questions tagged [significant-digits]

Significant digits are a way of describing the precision of measurements in a scale-independent way.

Typically if a number is in normal scientific notation, the number of significant digits is the length (number of digits) of the mantissa or significand. The significant figures of a number are those digits that carry meaning contributing to its precision. This includes all digits except: All leading zeros, Trailing zeros when they are merely placeholders to indicate the scale of the number (exact rules are explained at Identifying significant figures), and spurious digits introduced, for example, by calculations carried out to greater precision than that of the original data, or measurements reported to a greater precision than the equipment supports.

Numbers are often rounded to avoid reporting insignificant figures. For instance, if a device measures to the nearest gram and gives a reading of 12.345 kg, it would create false precision to express this measurement as 12.34500 kg. Significant Figures - Wikipedia

178 questions
0
votes
3 answers

How to export a Mathematica list as a fixed-width text file while preserving sig figs?

My first question is how would I export my data in a fixed-width format using Mathematica? My second question is how do I preserve the right most 0's. For instance, I like to save {{1.12300, 11.12, 111.123},{2.1, 22.123, 222}} into a text file…
Miladiouss
  • 4,270
  • 1
  • 27
  • 34
0
votes
0 answers

Python User defined number of output decimals

I want to make a small python script to calculate pi to N number of decimal points and then only output that number of decimals. I don't know how to change the print statement to dynamically limit the number of outputted decimals. Here's my code.…
0
votes
0 answers

Limit the number of digits used/printed in R in ANY context

Is there any way of limiting the number of digits R displays in any context? I have tried everything, including options(digits = 3). Take a look at this output from my code (after calling options(digits = 3)): compute(NN,…
Luther_Blissett
  • 327
  • 1
  • 6
  • 16
0
votes
1 answer

Get n LSB from Integer C++

So I'm getting an unsigned int passed into my function. Now I must obtain the n LSB bits of that integer and use it to access a location in an array of size 2^n. So for example, if my array is of size 1024, n = 10. I am currently doing this:…
Alk
  • 5,215
  • 8
  • 47
  • 116
0
votes
3 answers

How many digits can be stored for a number in SQL Server 2005?

I have a number from an Oracle database of 47306832975095894070.85314746810624532. When I bring it into SQL Server, it certainly doesn't show that many digits. It shows as 4.73068329750959E+19, and the field is defined as FLOAT. I think that…
thursdaysgeek
  • 7,696
  • 20
  • 78
  • 115
0
votes
0 answers

A significant figure of division of time command's result

I use time command to measure execution time of the code A and B. I got results, and now, I want to get ratio between A and B. Concretely, I have execution time as below. A : 0m0.819s B : 0m2.119s I need x in B = x * A. So, I did the division 2.119…
mmsss
  • 263
  • 1
  • 2
  • 7
0
votes
3 answers

Determine how many decimal digits of a float are precise

The error below occurs on the 14th decimal: >>> 1001*.2 200.20000000000002 Here* the error occurs on the 18th decimal digit: >>> from decimal import Decimal >>>…
user
  • 5,370
  • 8
  • 47
  • 75
0
votes
2 answers

Increase the significant digits in Numpy

I want to know how can I increase the number of significant digits beyond the decimal. The original "rf" numpy array contains floating point numbers. import numpy as np rf=daily_rets(df) [ 7.11441183 7.12383509 7.13325787 7.16152716 7.17094994 …
Nagesh Joshi
  • 51
  • 1
  • 1
  • 6
0
votes
0 answers

Controlling the number of significant factors in R

I want the number of significant figures in my whole R-code to be 15. The option: options(digits=15) does not give me the output I want. It is rounding a result to the least number of significant digits. It gives me for example the…
Henry
  • 25
  • 6
0
votes
2 answers

percentage with significant digits

I noticed that if you are printing a vector of percentages that are on the same order of magnitude, percent() works well in getting you three significant digits. > library(scales) > percent(c(0.123,0.234)) [1] "12.3%"…
C8H10N4O2
  • 18,312
  • 8
  • 98
  • 134
0
votes
2 answers

Regular expression for floats with a fixed number of significant digits

I'm trying to find a regular expression for a float with a fixed maximum (for example 4) number of significant figures. this should match with: - 123.4 - 12.34 - 1.2 - 223 - 0.1234 - 0.000001234 the problem is that the number of non-zeros before…
0
votes
1 answer

On significant figures of numbers in python

Hi I have a somewhat strange question. I am converting a list of numbers (which represent physical measurements), where each are reported to some specified accuracy in arbitrary units depending on the study it comes from. Here is an example of what…
astromax
  • 6,001
  • 10
  • 36
  • 47
0
votes
1 answer

Are rounding errors possible in Excel if under significant figure limit?

I have a database which houses scaled integers, the longest being 10 digits long. I am attempting to convert these to decimal values in Excel, moving the decimal point left by 4 digits, i.e. dividing by 10000. Given that these integers are…
toolshed
  • 1,919
  • 9
  • 38
  • 50
0
votes
0 answers

Is there a way to represent a number in binary where bits have approximately uniform significance?

I'm wondering if it is possible to represent a number as a sequence of bits, each having approximately the same significance, such that if we flip one of the bits, the overall value does not change by much. For example, we can use sequences of…
jdferreira
  • 651
  • 1
  • 6
  • 16
0
votes
2 answers

Increment the last digit of a number

VB2010 I have a user form where the user inputs a number format. The routine then cycles through a list of number pairs and displays them in a list of categories: User format "0.00" 0.00 - 164.04 …
sinDizzy
  • 1,300
  • 7
  • 28
  • 60
1 2 3
11
12