[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is there a math formula which rounds down(floors) a number by

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 24
Thread images: 1

File: math problems.jpg (105KB, 900x920px) Image search: [Google]
math problems.jpg
105KB, 900x920px
Is there a math formula which rounds down(floors) a number by simply using the number itself and basic math? By example: f(1,5)=1. Can we floor the number by only using the number itself and not picking out its decimal?
>>
>>8771694
Yes, floor(x) is a simple fiction using basic math and only x
>>
>>8771694
ceiling(x-1)

:^)
>>
>>8771699
Using * / + - ^ etc. how would one do that?
>>
f(n) = n - (n mod 1)
But that probably doesn't count for you.
>>
>>8771707
Can't be done without logarithms
>>
>>8771694

f(x) = x - (x % 1)
>>
>>8771709
Sorry, you need to use ceil or floor for that and I don't know how to do those with "classic" math :/
Thanks for the try thought
>>
Number - (number modulo 1).

Unless you meant in programming. In which case, just cast that shit to int.
>>
>>8771711
Can do those by using ^
How do I do it with logarithms?
>>
There's this but it's an infinite series and uses sin
https://en.wikipedia.org/wiki/Floor_and_ceiling_functions#Continuity_and_series_expansions
>>
Step aside brainlettos, I got this

x-1/2+sin(2pi*x)/pi+sin(4pi*x)/(2pi)+sin(6pi*x)/(3pi)+...
>>
>>8771742
can you make sin into it's basic formula too please?
Only +-*/^()
>>
>>8771753
no that's dumb
>>
>>8771753
not the guy but sin is also an infinite sum so you'll have infinite sums in an infinite sum and thats not rly cool
>>
>>8771753
Change it to polynomial basis
>>
>>8771762
That's sort of the point of it really, I'm trying to make a rediculousily long mathematical formula instead of default coding in a code I'm making.
So far I've got a replacement for if(a == a1 or b == b1 or c == c1...).
Now I'm trying to input many numbers as one, using 1,2453 as 1*2+4*5+3 etc.
Which is why it would be nice if it was completly basic math.
>>
>>8771785
There's nothing you can do that isn't going to be absurdly more complicated than just solving it the natural way (either using the built-in function or if you aren't allowed for some reason just truncating the decimal)
>>
>>8771795
>absurdly more complicated
I'm in
>>
>>8771707
are you retarded?
*/+-^ are all continuous except at 0, so to make a floor function with discontinuities at every integer is impossible. The best you can do is an infinite sum using those operations in there somewhere.
>>
>>8771694
Sure. [math]f(x) = \lfloor{x} \rfloor[/math]
>>
>>8771705
not if x is already an integer you fucking stupid homophobic slur
>>
>>8772211
What if the function maps from reals to the irrationals?

If you get a decimal number, multiply by powers of 10 to get an integer.
Then round that down to the nearest x where x is the power of 10 you used.
Finally, divide that number by 10^x to get your number.
>>
>>8772292
Sorry, what I mean is if you have f(2) = 1.3,

Then multiply 1.3 by 10 to get 13.
Round 13 to the nearest 10, which is 10.
Divide 10 by 10 to get an answer of 1.
Thread posts: 24
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.