Run ❯
Get your
own Java
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
public class Main { public static void main(String[] args) { System.out.println(Math.copySign(-4.7, 3)); System.out.println(Math.copySign(4.7, -2.5)); System.out.println(Math.copySign(3, 4)); System.out.println(Math.copySign(-2.5, -4.7)); } }
4.7
-4.7
3.0
-2.5