Java fags get in here vol2

Just answer the question first and then start insulting me for using java.

So some other fag asked a java question here few days ago and it got me thinking, how the fuck does

:code: Math.pow(4, 0.5); :stopcode:

work?

I tried finding out how it works by debugging but i couldn't "step into" the method.

So i tried going into the method manually by holding ctrl and clicking th method (i use netbeans).

So here is my code

:code: double result = Math.pow(3, 0.5); :stopcode:

here is the Math.pow method

:code: public static double pow(double a, double b) {
return StrictMath.pow(a, b); // default impl. delegates to StrictMath
} :stopcode:

and here is the StrictMath.pow method

:code: public static native double pow(double a, double b); :stopcode:


So how the fuck does this work?

Other urls found in this thread:

repo.or.cz/glibc.git/blob/HEAD:/sysdeps/ieee754/dbl-64/e_pow.c
developer.classpath.org/doc/java/lang/StrictMath-source.html
hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/share/native/java/lang/StrictMath.c
twitter.com/SFWRedditImages

damn, i got trolled about this :code: :stopcode: thing. can you guys also teach me how to do that?

Math.pow just returns the first parameter to the power of the second parameter. What dont you undersrand? Also you intellij for your ide everything else is trash

Y
native qualifier means the actual code is written in C/C++ somewhere user. Read up on JNI.

No fucking shit. I am trying to understand how is it calculated behind the scenes. You know, i am being curious like a good computer engineer should be.

Thanks. I was curious what the fuck this native keyword is. I looked at the index of my book "Java How to Program". And the only place where it talks about the native keyword is the table where it shows the keywords in java. It doesn't explain what it is. I shall send an angry email to Paul Deitel :P

your autistic rambling didnt make that clear. Download a not shit ide (intellij) and it will decompile the source for you and you can see what it does. It probably works how you wouldnt think it does, its just going to be doing math in 1 or two lines in c and rerurning

"This is a test"
This is a test

tag

How much longer will applets and the garbage plugin be supported?

sage

test

>intellij
Use open source.

sage

test

sage

test[\code]

glibc implementation is here i think

repo.or.cz/glibc.git/blob/HEAD:/sysdeps/ieee754/dbl-64/e_pow.c

sage

test[\]

Are you just interested in how it could be done? Fucking Google it

sage

test

test2

test3

I dont use shitty altenative just so i can shill for open source. If you dont use intellij you arent a real java dev in 2017

developer.classpath.org/doc/java/lang/StrictMath-source.html
line 1511
you're probably looking at an interface instead of the implementation...

You don't need to concern yourself how it all works under the hood, you only need to know that it works.

read the fucking rules and lurk moar

:stopmusic:

>Math.pow(4, 0.5);
you mean Math.sqrt(4); ?

I can't get over how fucking sexy the core math stuff is.

Enjoy you russian spyware

hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/share/native/java/lang/StrictMath.c

can anyone recommend me the best books for learning java?

> :code:
> :stopcode:

->you will never bait this hard

>paid proprietary software means it's spyware
Would love to see one credible source that intellij is spyware

Read the javadocs. Rtfm

[kode] haha fucking newfag [staphkode]

>He installs russian closed source software that constantly phoned home in his computer

Ewww

>lying
Heh

Proprietary shitware should never be trusted, especially when they come from Russia. You have alternatives such as Eclipse, a much older project that does not phone home.

>lying about "phone home"
Lol this is steven spielberg ET.

It constantly phones home to make sure you are not using a pyrate copy, and who knows what else.

Woah i better find a new ide now because software has drm.

Poor little IntelliShill, you are beyond salvation.

>everyone who disagrees with me is a shill

>He shills for propitary russian software

I hope you are at least getting pay.

obviously. why would you do anything in life if you're not getting paid for it?

That explain it all, russian shill confirmed

jshell my dude

$jshell
jshell> Math.pow(4, 0.5)
$1 ==> 2.0

jshell>
/exit

Not so hard now, is it?

Also, ignore the Russian shills. IntelliJ Idea is terrible. It can't even handle partial git commits in a single file. The only reason anyone uses it is for Android Studio, because they have to.

>native

It calls a native lib to do the work
Probably in asm
Because that's fastest
You don't reimplement math algorithims in Java if there's a CPU instruction that can do it. That would just be stupid.

>It can't even handle partial git commits in a single file
So use command line git if you need something that its graphical git stuff doesn't offer?

>Don't use Eclipse, that can do this in the UI
>Use the command line git
>IntelliJ master race

wahahahahaha
BTFO again

>oh look I cherry-picked one thing that eclipse does better, doesn't matter if eclipse is trash in every other way

You take a [ and then you take a ]
Then you put "code" between them

This starts the code block.

Then you take a [ and you take another ]
Then you put "/code" between them

This ends the code block.

Of course you should not include the quotation marks.

How do I restrict input of a JavaFX box using regex?
I'm working on L-Systems and have to input rules for the system to follow.
I thought I had it, but failed when the regex I used would only allow the input of a single rule.

[a-zA-Z ][= ][a-zA-Z+\\-; ]

How would I make this accessible to several rules?

["code"]this is a test["/code"]

thanks

["code"]puts "bs"["/code"]

test
test
testtttuuy
hehe

I hope I didn't fall for a meme

public class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}

Core java for the impatient is pretty good, although it's the only book I've ever read on java. It covers java 8 too.
For concurrency, I see Java Concurrency in Practice recommended pretty often.

>not registering at the local JC to get a free .edu email address just so you can get the ultimate edition of all jetbrains software for free
stupid nigger

Netbeans is way better than eclipse and intellij.

>oh look it's another stupid Sup Forums meme

WTF are you even talking about? is not intelij opensource under apache 2.0 licence?