java is so fun

public static void main(String[] args) {
double x = Math.random() * 5 ;
double result = Math.pow (3,x) ;
do{
x = Math.random() * 5 ;
result = Math.pow (3,x) ;
}while (result != 26);
{
System.out.println (x) ;
}

translation:
creates a number betweeen 0 and 5,elevates 3 by that,and if the result is 26,the number between 0 and 5 is shown (this number has 15+ decimals)

i shall now wait all eternity until that`s complete

I’ll just leave this here.

OLOLOL

Java can be frustrating if you want to do something that uses a predefined class that you don’t know the name of. It’s the sort of language that’s made 10x easier when you have an API chart in your office.

Personally I’ve found the Java API docs about the most comprehensive and understandable out of anything I’ve programmed with.

Are you trying to suggest that Java invented multi-threaded programming? Utter poppycock.

Double post, please delete.

Who the hell knows what he is trying to suggest? It could be anything.

2,9656472730442501304791295215873

close Thread and javaw.exe

That code is very inefficient.
while(true);
would be the same.
Math.random() only gives values between 0 and 1.
You need 1,6859725852924773947372171353502 to get 2,9656472730442501304791295215873 so FAIL.

This should work:

class WTF
{
public static void main (String[] args)
{
public static long random (long min, long max)
{
return min + Math.round(Math.random() * (max-min));
}
double x =random(0,5) * 5 ;
double result = Math.pow (3,x) ;
do{
x =random(0,5) * 5 ;
result = Math.pow (3,x) ;
}while (result != 26);
{
System.out.println (x) ;
}
}
}

Your function returns a long integer for random numbers though?

oh copy and paste fail sry.

public static double random (double min, double max)
{
return min + Math.round(Math.random() * (max-min));
}

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.