Math & Science ⇒ Whole and Fractional part symbols?
-
- Posts: 156
- Joined: Sat Jan 22, 2011 9:55 pm
Whole and Fractional part symbols?
Are there a symbols (and how do you make them) for taking the whole part and the fractional part of a number?
In other words, if the number is
98.546742209631728045325779036827
the whole part (not necessarily the floor) would be
98
and the fractional part would be
.546742209631728045325779036827.
Thanks,
A formerly stupid user.
In other words, if the number is
98.546742209631728045325779036827
the whole part (not necessarily the floor) would be
98
and the fractional part would be
.546742209631728045325779036827.
Thanks,
A formerly stupid user.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: Whole and Fractional part symbols?
TeX / LaTeX is a markup language:
http://en.wikipedia.org/wiki/Markup_language
For your task you will need a programming lagnuage:
http://en.wikipedia.org/wiki/Programming_language
Nikolay
http://en.wikipedia.org/wiki/Markup_language
For your task you will need a programming lagnuage:
http://en.wikipedia.org/wiki/Programming_language
Nikolay
-
- Posts: 156
- Joined: Sat Jan 22, 2011 9:55 pm
Re: Whole and Fractional part symbols?
I understand the difference. I'm not looking for a something which will do the calculations, I want to know if there is a symbol which represents the functions described and, if so, how to make that symbol in Latex.
Whole and Fractional part symbols?
I guess you need the "mod" and "div" operators. If I am not mistaken:
http://en.wikipedia.org/wiki/Mod_operator
http://www.artofproblemsolving.com/Wiki ... X:Commands
Then:
Nikolay
Code: Select all
7 div 3 = 2
7 mod 3 = 1
http://www.artofproblemsolving.com/Wiki ... X:Commands
Then:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[ x \div{y} = 98 \]
\[ x \mod{y} = 546742209631728045325779036827 \]
\end{document}
-
- Posts: 156
- Joined: Sat Jan 22, 2011 9:55 pm
Whole and Fractional part symbols?
Well, the homework is to calculate the remainder, but not using div or mod (the next step is learning div and mod), so I don't think I can use them.justdeath wrote:I guess you need the "mod" and "div" operators. If I am not mistaken:http://en.wikipedia.org/wiki/Mod_operatorCode: Select all
7 div 3 = 2 7 mod 3 = 1
http://www.artofproblemsolving.com/Wiki ... X:Commands
Then:NikolayCode: Select all
\documentclass{article} \usepackage{amsmath} \begin{document} \[ x \div{y} = 98 \] \[ x \mod{y} = 546742209631728045325779036827 \] \end{document}
The students (I'm the TA writing up the answers) are to calculate the remainder using the equation:
Code: Select all
remainder=b \cdot fractional part (\frac{a}{b})
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Whole and Fractional part symbols?
To quote the Wikipedia's "Floor and ceiling functions" article:
"The floor and ceiling function are usually typeset with left and right square brackets where the upper (for floor function) or lower (for ceiling function) horizontal bars are missing, and, e.g., in the LaTeX typesetting system these symbols can be specified with the \lfloor, \rfloor, \lceil and \rceil commands in math mode."
So you could say,
Note that it makes very little sense to refer to a remainder if either a or b is negative without defining the modulo operator somehow. For example, Fortran defines TWO such functions---mod() preserves the sign of the dividend, while modulo() preserves the sign of the divisor.
"The floor and ceiling function are usually typeset with left and right square brackets where the upper (for floor function) or lower (for ceiling function) horizontal bars are missing, and, e.g., in the LaTeX typesetting system these symbols can be specified with the \lfloor, \rfloor, \lceil and \rceil commands in math mode."
So you could say,
Code: Select all
R = a - b\lfloor \frac a b \rfloor & a, b \ge 0