Paolo Lemos

Greenhorn
+ Follow
since Aug 19, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Paolo Lemos

Its work fine with:



Now i have:


And the output is:


2.828427
2.82842712474619
2.82842712474619



The new interesting thing is the sqrt3 method, i dont understand how the expression


transforms into :


In this last form, the condition works fine.
9 years ago
Hi all, im implementing the babylonian method to get the square root of a number as you can see here (in spanish) (wikipedia) .

Mi first code is:


And it works , but then i try with doubles:

And it loops for ever for numbers like "8".

I want to know why is this, and the same happens in C++ with doubles.

Thanks.
9 years ago

Jesper de Jong wrote:Hello Paolo, welcome to the Ranch.

You're asking quite a specific question about an advanced topic, and I don't have a direct answer for you. I think the question is hard to answer, because it depends on the implementation details of the JVM. One place you could start looking is at the source code of OpenJDK (Oracle's Java 6 and Java 7 are almost equal to OpenJDK). But I think it will not be an easy task to find this out from the source code...



Glad to hear something from somebody. Thanks!
11 years ago
Hello forum.

In mi application i'm using ServiceLoader to load modules(classes from .jar file) with diferents ClassLoaders in order to completely unload them when not needed from the context of the application and from the JVM itself. I know maybe is not a common topic "unload classes from JVM", there are some conditions for that to happen, so i am making the necesary effort. To make sure if all is working like expected im tracing the load and unload of classes with -XX:+TraceClassLoading and -XX:+TraceClassUnloading, the info from this parameters shows me that i can do a complete unload of any module from mi app and from the JVM itself (unload from the JVM happens during a complete GC). All this seems to work fine... but mi question is why the .jar files from where the module classes was loaded are keep open by the JVM?, that .jars cant be removed but the JVM says to have unloaded the classes from them. Obiusly this is during JVM execution, but why keep open that .jar files if the JVM has no class loaded from them?, there is any thing i can do to force the JVM to free that .jar files?.

Thanks in advance, and sorry bad english.
11 years ago
Hi all the forum.

Please Can somebody tell me how to REMOVE the "It Works" default page?, i cant find it anywere!. I have mi Webapp in the ROOT folder of mi pc, the server is configured to run in the 80 port and mi router have port 80 open. The good thing is that i can see mi webapp in mi pc, but canr do it from the outside. I have a NO-IP dns, but the dns or the ip both doesnt works... The browser shows "It Works". I have tried a lot of things and cant figure out how to resolve this. Why external users see the "it works" message??. Thanks.
11 years ago