My Math Forum  

Go Back   My Math Forum > College Math Forum > Number Theory

Number Theory Number Theory Math Forum


Reply
 
LinkBack Thread Tools Display Modes
January 4th, 2013, 12:23 PM   #1
Member
 
Joined: Aug 2011

Posts: 42
Thanks: 0

Cutting off decimals

Hello!

Is there any good method for cutting off decimals from a number? I've been thinking about it for a while, and came up with this method (assume x is a decimal number):

x - x%1 = x without decimals

In the situation I'm using this method, everything looks so messy, because I reuse it several times. Is there another way to cut off decimals like this?

Thanks
/Benmuskler
benmuskler is offline  
 
January 4th, 2013, 12:40 PM   #2
Global Moderator
 
CRGreathouse's Avatar
 
Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: Cutting off decimals

What are you using?

In C I would write (int)x or the like. In GP I would write x\1 or floor(x). In Perl you can do floor(x) as long as you have use POSIX;.
CRGreathouse is offline  
January 4th, 2013, 12:46 PM   #3
Member
 
Joined: Aug 2011

Posts: 42
Thanks: 0

Re: Cutting off decimals

I'm sorry I might have been a bit unclear. I'm not using any programming language. It's only mathematical.
benmuskler is offline  
January 4th, 2013, 12:47 PM   #4
Global Moderator
 
CRGreathouse's Avatar
 
Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: Cutting off decimals

Then I would write , or in a pinch either [x] or floor(x).
CRGreathouse is offline  
January 4th, 2013, 12:53 PM   #5
Member
 
Joined: Aug 2011

Posts: 42
Thanks: 0

Re: Cutting off decimals

Thanks! I can't say I've ever seen the floor function written like that before, i.e. the L-shaped brackets. Is that some standard/official way of writing it that my teacher will understand when reading the work through?
benmuskler is offline  
January 4th, 2013, 03:21 PM   #6
Senior Member
 
MarkFL's Avatar
 
Joined: Jul 2010
From: St. Augustine, FL., U.S.A.'s oldest city

Posts: 12,211
Thanks: 520

Math Focus: Calculus/ODEs
Re: Cutting off decimals

Yes, your teacher should be familiar with any of the notations given by [color=#008000]CRGreathouse[/color].
MarkFL is offline  
January 6th, 2013, 01:04 PM   #7
Senior Member
 
Joined: Dec 2012

Posts: 148
Thanks: 0

Re: Cutting off decimals

you can show any number x = [x] + {x}
tahir.iman is offline  
Reply

  My Math Forum > College Math Forum > Number Theory

Tags
cutting, decimals



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How would I turn this into decimals? 1love Algebra 4 September 10th, 2013 11:07 PM
cutting sticks problem jeepin81 Algebra 0 April 15th, 2011 01:17 PM
Short cutting differentiation when an x value is known engininja Calculus 7 July 26th, 2010 07:59 PM
Cutting problem monicao Applied Math 1 November 27th, 2009 10:31 AM





Copyright © 2019 My Math Forum. All rights reserved.