[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]

hello sci i have one question say you have two numbers a and

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: 13
Thread images: 3

File: a2rowXY_460s.jpg (47KB, 460x734px) Image search: [Google]
a2rowXY_460s.jpg
47KB, 460x734px
hello sci i have one question say you have two numbers a and b how can you equate them to equal the bigger number of the two? i have a solution but i was wondering if there is one without abs (a+b+abs(a-b))/2 please post your solution pic unrelated
>>
[eqn]\mathrm{max}\{a,b\}=\lim_{p \rightarrow \infty} \left( \frac{a^p + b^p}{2} \right)^{1/p}[/eqn]
https://en.wikipedia.org/wiki/Generalized_mean
>>
>>8731069
this doesnt work its always 1 and also i need to use only the a and b not any other variable
>>
File: C3s9nXlUEAI-odS.jpg (81KB, 1000x1000px) Image search: [Google]
C3s9nXlUEAI-odS.jpg
81KB, 1000x1000px
>>8731069
that's exactly what OP meant I am sure
>>
>>8731071
and without limit
>>
answer pleas
>>
>>8731086
use an if statement
>>
>>8731092
thats the point i have to do it in one line
get a and b from the user
put it in a variable and print it
>>
>>8731096
it was a joke, but you could exchange abs for the root of the square
>>
>>8731103
aren't square roots massively more inefficient than absolute values? In terms of computational time.

Not that it matters for this silly question
>>
>>8731156
I would assume so, but you haven't said why you can't use abs yet.
>>
>>8731096
a>b?a:b
>>
>>8731062
listen, you are either going to have to use abs(), a limit (or an infinite sum, which is also a limit), or the step function (which is just a re-scaled abs),

there arnt nice elementary functions with the non smooth behavior needed for the max function.
Thread posts: 13
Thread images: 3


[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.