贴现率、公式
Discount rates, Formulas
例如,我有一台打折的电脑,这台电脑的价格是$450,打折10%,我想知道它的真实价格,
我想学习这个既有 10% 又有 10% 的钱。
Computer 10% off Price = 450$
Computer off Price = 490$
$net_total = 450;
$discount_value = 10; < percent or amount
$gross_price = ?;
好吧,让我们来解方程:
Computer 10% off Price = 450$
Computer off Price = 490$
可以写成(设x
为电脑的初始价格)
x - x * 10 / 100 = 450 # initial price - x without 10 % from x - x * 10% / 100%
x - 10 = 490 # just 10$ off
或
0.9 * x = 450
x = 500
终于
x = 450 / 0.9 = 500
x = 500
所以从两个等式我们得到初始计算机的价格是 500$
编辑:一般情况下,
如果$discount_value
代表百分比(即$discount_value = 10
表示10%
折扣)那么
$gross_price = $net_total * 100.0 / (100.0 - $discount_value)
如果$discount_value
代表money(即$discount_value = 10
表示10$
折扣),则
$gross_price = $net_total + $discount_value
例如,我有一台打折的电脑,这台电脑的价格是$450,打折10%,我想知道它的真实价格, 我想学习这个既有 10% 又有 10% 的钱。
Computer 10% off Price = 450$
Computer off Price = 490$
$net_total = 450;
$discount_value = 10; < percent or amount
$gross_price = ?;
好吧,让我们来解方程:
Computer 10% off Price = 450$
Computer off Price = 490$
可以写成(设x
为电脑的初始价格)
x - x * 10 / 100 = 450 # initial price - x without 10 % from x - x * 10% / 100%
x - 10 = 490 # just 10$ off
或
0.9 * x = 450
x = 500
终于
x = 450 / 0.9 = 500
x = 500
所以从两个等式我们得到初始计算机的价格是 500$
编辑:一般情况下,
如果$discount_value
代表百分比(即$discount_value = 10
表示10%
折扣)那么
$gross_price = $net_total * 100.0 / (100.0 - $discount_value)
如果$discount_value
代表money(即$discount_value = 10
表示10$
折扣),则
$gross_price = $net_total + $discount_value