How to describe ceiling- and floor-like functions that round to a specific decimal place?

127 Views Asked by At

I am trying to describe floors and ceilings with non-integer factors. Rather than rounding up or down to the nearest integer, I need to for example round to the nearest 0.1.

For example, in what I'm writing, $\lfloor3.21\rfloor$ should give $3.2$

How can I represent that?

  • $\lfloor3.21\rfloor^{0.1}$ ?
  • $\lfloor3.21\rfloor_{0.1}$ ?

I could just guess and use a superscript or subscript, as shown above but I wanted to know if there's a more formal way of representing such non-integer floors/ceilings and I have not been able to find any.

1

There are 1 best solutions below

0
On BEST ANSWER

You are of course free to devise your own notation, provided you define it before you use it. However, your notation should be designed to avoid confusion or ambiguity when used with other established notations; e.g., a superscript would be confused with exponentiation, as well as become unwieldy if you actually wanted to use both operations; e.g., what does $$(\lfloor 3.21 \rfloor^{0.1})^2$$ mean? But there is no "standard" or canonical notation for what you propose. The way we would mathematically write such an operation is to do what was proposed in one of the comments: for some base $b$, the expression $$\frac{\lfloor b^m n \rfloor}{b^m}$$ represents the greatest number less than or equal to $n$ to within $m$ digits of base-$b$ precision; e.g. for $b = 10$ and $m = 1$, this is the greatest tenth of an integer less than or equal to $n$. For $b = 2$ and $m = 3$, this is the greatest binary number to within $3$ bits precision less than or equal to $n$, so if $n = (11.3257)_{10}$, that is to say, we wrote this in base $10$, $$\frac{\lfloor 8n \rfloor}{8} = (11.25)_{10} = (1011.010)_{2}.$$