File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 3
3
import java .math .BigDecimal ;
4
4
import java .math .BigInteger ;
5
5
6
+ /*A simple calculator that computes the relativistic kinetic energy of an object using the acceleration of the object over a distance.
7
+ Was intended to give a Wolfram-Alpha-like energy comparison past the point where Wolfram Alpha rounded velocity to 1c. No user input
8
+ provided as I just wanted to play with the math a bit.
9
+
10
+ Uses a BigDecimal math library by Richard J. Mathar found here: http://arxiv.org/abs/0908.3030
11
+ */
6
12
public class Main
7
13
{
8
14
public static void main (String [] args )
9
15
{
16
+ BigDecimal c = new BigDecimal ("299792458" ); //Speed of light
17
+
18
+ //Inputs to calculator
10
19
BigDecimal mass = new BigDecimal (10 );
11
- BigDecimal c = new BigDecimal ("299792458" );
12
20
BigDecimal distance = new BigDecimal ("600" );
13
21
BigDecimal acceleration = new BigDecimal (8.7 *Math .pow (10 ,21 ));
22
+
23
+ //Energy of various energetic events/objects.
14
24
BigDecimal chicxulub = new BigDecimal (5 *Math .pow (10 ,23 ));
15
25
BigDecimal tsar = new BigDecimal (2.092 *Math .pow (10 ,17 ));
16
26
BigDecimal boy = new BigDecimal (6.3 *Math .pow (10 ,13 ));
You can’t perform that action at this time.
0 commit comments