The Unofficial Macro Scheduler Puzzler of the Week 3
Moderators: Dorian (MJT support), JRL
hagchr,
Very good job reducing that down.
Even though the initial puzzler requirement was for "fewest lines" and your solution doesn't go to zero lines, I'll give you 10 rep points for your efforts... but only if you can figure out how to fix this problem. Don't worry, its an easy fix. I discovered last night that hoangvo81's solution still has an issue and your solution has the same issue. If "InitVal1" is less than 1, rounding always rounds up to 1. In other words,
Let>InitVal1=0.83
Let>RoundOffset=0.84
mdl>{trunc((%initval1%)-(%roundoffset%))+1}
rounds to 1 rather than rounding to 0 which would be the expected outcome. Fix that problem and I'll set you up with 10 rep points.
@EnderFFX
Thank you.
Me too.
Very good job reducing that down.
Even though the initial puzzler requirement was for "fewest lines" and your solution doesn't go to zero lines, I'll give you 10 rep points for your efforts... but only if you can figure out how to fix this problem. Don't worry, its an easy fix. I discovered last night that hoangvo81's solution still has an issue and your solution has the same issue. If "InitVal1" is less than 1, rounding always rounds up to 1. In other words,
Let>InitVal1=0.83
Let>RoundOffset=0.84
mdl>{trunc((%initval1%)-(%roundoffset%))+1}
rounds to 1 rather than rounding to 0 which would be the expected outcome. Fix that problem and I'll set you up with 10 rep points.
@EnderFFX
Thank you.
Me too.
trunc after adding +1
using hagchr .. reduced form:
@EnderFFX
me too - these really gets you thinking.
Code: Select all
Let>InitVal1=4.85
Let>RoundOffset=0.84
mdl>{trunc((%initval1%)-(%roundoffset%)+1)}
me too - these really gets you thinking.