Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
thomasahle
on June 4, 2019
|
parent
|
context
|
favorite
| on:
Zero Rupee Note
I'm having a hard me thinking of a case where you'd want to divide by an amount of money. What am I missing?
Ma8ee
on June 4, 2019
|
next
[–]
For example to calculate the expected time left to pay the remaining debt if you make a monthly payment of that amount.
delinka
on June 4, 2019
|
parent
|
next
[–]
So dividing by number of months, which is not dividing by an amount of money.
vollmond
on June 4, 2019
|
root
|
parent
|
next
[–]
var balance = 0
var lastPayment = 0
var remainingPaymentsAtThisRate = balance/lastPayment
// divide by zero error
cbzoiav
on June 5, 2019
|
root
|
parent
|
next
[–]
Surely that doesn't account for interest?
vollmond
on June 5, 2019
|
root
|
parent
|
next
[–]
My goal with this 3-line pseudocode snippet was not to reproduce a banking loan administration system in its entirety, but just to show a place where it could make sense to divide by currency.
red75prime
on June 4, 2019
|
prev
[–]
Or to produce a report on percent of debt that has been repaid.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: