Difficult Question on decimal placing

  • MHB
  • Thread starter Elementry
  • Start date
In summary, the conversation is about finding a program or software that can extract digits on both sides of a decimal point and add in specific rules. The desired result is to be able to move the decimal point and strip off digits from the number. The discussion also mentions using the int(x) function to accomplish this task.
  • #1
Elementry
1
0
Hi All,

Trying to find a program or (excel) or any software which allows you to cross over both sides of the decimal place. I want to extract left and right of the decimal and add in rules . I can't seem to find any programs to do this.
Any help would be good.

1. entering a number say - 1234.45

i would like to do two things, select the right side decimal numbers plus the 1st left placing. = 445 beocmes the number

And i woudl like to be able to extract the next decimal over so 1234.45 becomes 344.5 .

im not sure what this is called or how to achcieve it in excel or any math program , any help would be good.

PS - obviously id like to be able to go 2 left placing and two right combined so the example above would be : 1234.45 would be 3445

appreaciate any help or idea what this type of math is called or comes under

thkx
 
Mathematics news on Phys.org
  • #2
Hello Elementry,

I have moved this topic, as it is more of a programming question than one of mathematics, although some basic math is involved.

To move the decimal point, multiplying by a power of 10 will do the trick. A positive power moves it to the right, while a negative power moves it to the left.

Then, to strip off the digits to the right of the decimal point, you could use the int(x) function intrinsic to most programming languages, known as the floor or greatest integer function in mathematics, to accomplish this. For example:

1234.45 - int(1234.45) = 0.45

Will your data always have the format xxxx.xx?
 

FAQ: Difficult Question on decimal placing

What are decimal places?

Decimal places refer to the digits after the decimal point in a number. For example, in the number 3.14159, the decimal place is 5.

Why is it important to place decimals correctly?

Placing decimals correctly is important because it determines the accuracy of a number. A small change in decimal placement can result in a significant difference in the value of a number.

How do you round a number to a specific decimal place?

To round a number to a specific decimal place, look at the digit to the right of the desired decimal place. If the digit is 5 or greater, round the number up. If the digit is less than 5, round the number down. For example, to round 3.14159 to 2 decimal places, we would look at the 3rd digit after the decimal point (1), which is less than 5, so the number would be rounded down to 3.14.

Can decimal places be negative?

No, decimal places cannot be negative. Negative numbers are represented with a minus sign, not a decimal point.

Why do some currencies have more decimal places than others?

The number of decimal places in a currency is determined by its value. Currencies with higher values, such as the US dollar, have fewer decimal places to represent larger amounts. Currencies with lower values, such as the Japanese yen, have more decimal places to represent smaller amounts.

Similar threads

Replies
1
Views
1K
Replies
8
Views
2K
Replies
0
Views
962
Replies
1
Views
603
Replies
4
Views
3K
Replies
18
Views
4K
Replies
1
Views
2K
Back
Top