It's always kind of annoyed me when you need just the first digit of a decimal or you want to round up to the next whole number that you always seem to have to use floor or ceiling functions that you can't use ordinary techniques with because they are sort of outside of usual calculus. So anyway I came up with these conversions:
Floor(t) = t-u(t) where u(t) =
Then there's the Ceiling function or round up,
Ceil(t) = t+U(t) where U(t) =
* One caveat is that the function is undefined at the exact whole numbers. I guess it depends on how you define floor whether the floor of 4.0 would be 3.0 or 4.0 but with these equations putting in whole numbers is equivalent to a divide by 0.
*If you look on wikipedia you can see the equations that led to these equations, they are the result of an infinite sum of sin waves (you have to scroll a ways down under "Series Expansion),
but they don't mention that that infinite sum has a closed form and the problem they mention of the whole numbers giving a value halfway in between doesn't come up, these are instead undefined there.