Difference between revisions of "ZCubes/How to Apply Universal Constants and Unit Conversions"

From ZCubes Wiki
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
 
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
 
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
  
 +
==Examples==
 +
Universal constants that are pre-defined in ZCubes can be used in functions by using '%' symbol before the constant parameter.
  
 +
E.g 1] To calculate the Energy 'E', the universal constant value of speed of light can be used directly in ZCubes as:
  
<<[[Learn_ZCubes | Learn ZCubes ]]
+
</br>
 +
<math>E := m*%c^2;</math>
 +
</br>
 +
<math>E(2)</math>
 +
 
 +
displays the result as ''179751035747363520''.
 +
 
 +
 
 +
E.g 2] To calculate the Force 'F', the gravitational constant can be used in ZCubes as:
 +
 
 +
</br>
 +
<math>F := m*%g;</math>
 +
</br>
 +
<math>F(2)</math>
 +
 
 +
displays the result as ''19.6133''.
 +
 
 +
 
 +
E.g 3] To calculate the Energy 'E'and display it using appropriate unit, the ZCubes code can be written as:
 +
 
 +
</br>
 +
<math>E := m*%c^2;</math>
 +
</br>
 +
<math>E(2kg)<>J</math>  ..'J(Joule)' is the MKS unit of Energy
 +
 
 +
displays the result as ''179751035747363520J''.
 +
 
 +
 
 +
 
 +
<br/>
 +
*[[Z3 | Z3 home]]
 +
*[[Z^3 Language Documentation]]
 +
*[[ZCubes_Videos | ZCubes Videos and Tutorials]]
 +
*[[Main_Page | About ZCubes ]]
 +
<br/>
 
<br/>
 
<br/>
 
&copy; Copyright 1996-2020, ZCubes, Inc.
 
&copy; Copyright 1996-2020, ZCubes, Inc.

Latest revision as of 14:04, 14 September 2021

How to Apply Universal Constants and Unit Conversions


All the Universal constants or Physical/Chemical constants such as ‘Gravitational constant’, ‘Speed of light’, ‘Avogadro’s number’ etc are available in ZCubes in a way they can be used in functions. This video demonstrates how to use these constants in Z programming or spreadsheet computations using easy notations. ZCubes handles computations with ‘Units’ which is extremely useful in scientific computations.

Video


Universal Constants and Unit Conversions














Examples

Universal constants that are pre-defined in ZCubes can be used in functions by using '%' symbol before the constant parameter.

E.g 1] To calculate the Energy 'E', the universal constant value of speed of light can be used directly in ZCubes as:



displays the result as 179751035747363520.


E.g 2] To calculate the Force 'F', the gravitational constant can be used in ZCubes as:



displays the result as 19.6133.


E.g 3] To calculate the Energy 'E'and display it using appropriate unit, the ZCubes code can be written as:



..'J(Joule)' is the MKS unit of Energy

displays the result as 179751035747363520J.





© Copyright 1996-2020, ZCubes, Inc.