I decided to make a spreadsheet on excel about hours of driving (I am on my L's) and I needed to find an equation to turn a number like $1.55$ into $115$ or $1.3$ into $90$. I found out how to use floor functions on excel and inputted the equation $y=60(\left\lfloor x\right\rfloor+6(x-\left\lfloor x\right\rfloor))$ which simplifies to $$ y=360x-300 \lfloor x \rfloor $$- wherein the output is equivalent to $x$ rounded down to the nearest integer with the addition of the remainder left after taking the whole numbers out of $x$ divided by $0.6$ (or multiplied by $6$) like you would to in a percent, turning base $60$ into base $10$ - getting $1.91666...$ and then multiplying it all by $60$ so as to turn hours into minutes. I want to get an equation to turn a number like $115$ into $1.55$ and so on. How do I solve $ y=360x-300 \lfloor x \rfloor $ for $x$? I plotted both $ y=360x-300 \lfloor x \rfloor $ and $ x=360y-300 \lfloor y \rfloor $ on Desmos, and it checks out the vertical line test, not the horizontal line test though (for obvious reasons) so is that even possible?)
How do I solve $y=360x-300\left\lfloor x\right\rfloor$ for $x$? (turning minutes into hours in the format $115$ into $1.55$ (base $60$))
64 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
So if a understand what you are trying to do is that some $\require{cancel}$ $\cancel{\text{idiot}}$ helpful person has be writing down data of $A$ miles and $B$ minutes as $A.B$. And in a display of total $\cancel{\text{incomprehension}}$ subtlety of mathematics chooses to drop the trailing $0$s so that $30$ minutes becomes, not $.3$ and not $.30$? And you want the actual number of minutes.
Okay.
The number you are give is $x= A.B$.
So $\lfloor x\rfloor = A$. That is the number of hours.
$x - \lfloor x \rfloor = 0.B$ which is a decimal if value somewher betwee $0.0$ and $0.59$. The $\cancel{\text{idiot}}$ helpful person put in terms of portions of $\frac 1{100}$ and not portions of $\frac 1{60}$.
So $100 \times 0.B$ will equal the number of extra minutes.
So if you are given $A.B$ you what $A$ hours and $0.B \times 100$ minutes. And to get the total number of minutes you want $60\times A + 100\times 0.B$.
Or....
$60\cdot \lfloor x\rfloor + 100\cdot (x - \lfloor x\rfloor)$.
....
And if you want to be a $\cancel{\text{helpful person}}$ idiot and simplify this further you can use
$100\cdot x -40 \lfloor x\rfloor$.
If you do that you will assure that anyone who looks at you formula will $\cancel{\text{not have any idea what the heck you were thinking}}$ see that you thoughtfully chose to save a few keystrokes.
Frankly:
$Hours = \lfloor x \rfloor $
$ExtraMinutes = 100(x - Hours)$
$TotalMinutes = 60*Hours + ExtraMinutes$
would be a much clearer and useful and overall easier way to do it.
$$y = 360x - 300 \lfloor x \rfloor \\$$
If we suppose that, for some integer, $n$, $n \le x \lt n+1$, then
$$\color{red}{x = \dfrac{y+300n}{360}}$$
This will only be true when
$$n \le x \lt n+1$$ $$n \le \dfrac{y+300n}{360} \lt n+1$$ $$360n \le y+300n \lt 360n+360$$ $$60n \le y \lt 60n+360$$ $$\color{red}{n \le \dfrac{y}{60} < n + 6}$$
Hence
For any given value of $y$, there will be six integers, $n$, for which $n \le \dfrac{y}{60} < n+1$. For each of those values of $n$, there will be a corresponding value of $x = \dfrac{y+300n}{360}$ for which $y = 360x - 300 \lfloor x \rfloor \\$.