Genesis 2 Backwards Compatibility Bridge | 1. Do the GENESIS 2 math functions work correctly? |
| 1. Executed command |
echo { abs -22 }
|
| 2. Expected output | 22 |
| 1. Executed command |
echo {{ acos 0.707} * (360 / (2 * 3.1415926))}
|
| 2. Expected output | 45.0086 |
| 1. Executed command |
echo { acos 1 }
|
| 2. Expected output | 0 |
| 1. Executed command |
echo {cos {3.14159/4}}
|
| 2. Expected output | 0.707107 |
| 1. Executed command |
echo {asin 0.5}
|
| 2. Expected output | 0.5235987902 |
| 1. Executed command |
echo {{ asin 0.5 }*(180/3.1415926)}
|
| 2. Expected output | 30.00000135 |
| 1. Executed command |
echo {tan {3.14159/4}}
|
| 2. Expected output | 0.9999987 |
| 1. Executed command |
echo { atan 0.876 }
|
| 2. Expected output | 0.719396 |
| 1. Executed command |
echo { log 1 }
|
| 2. Expected output | 0 |
| 1. Executed command |
echo {log {exp 1}}
|
| 2. Expected output | 0 |
| 1. Executed command |
echo {log 0}
|
| 2. Expected output | Ininity |
| 3. This test is currently not executed | (disabled is 'Seems to give the same error in genesis 2.3, returns the word infinity with a dash in front of it, th dash is mistaken for a comand line option.') |
| 1. Executed command |
echo {max 1 2}
|
| 2. Expected output | 2 |
| 1. Executed command |
echo {max {tan 0.1} 0.1}
|
| 2. Expected output | 0.1003346741 |
| 1. Executed command |
echo {min 1 2}
|
| 2. Expected output | 1 |
| 1. Executed command |
echo {min 33.33 33.33}
|
| 2. Expected output | 33.33 |
| 3. Comment | Note how things get rounded by arithmetic floating point logic |
| 1. Executed command |
echo {sqrt 2}
|
| 2. Expected output | 1.414213 |
| 1. Executed command |
echo {sqrt 1}
|
| 2. Expected output | 1 |
| 1. Executed command |
echo {round 3.33}
|
| 2. Expected output | 3 |
| 1. Executed command |
echo {round 3.66}
|
| 2. Expected output | 4 |
| 1. Executed command |
echo {exp 1}
|
| 2. Expected output | 2.718281746 |
| 1. Executed command |
echo {pow 10 3}
|
| 2. Expected output | 1000 |
| 1. Executed command |
echo {gaussian 0 1 }
|
| 2. Expected output | 0.5069125295 |
| 3. This test is currently not executed | (disabled is 'Returns a random value so can't test.') |
| 1. Executed command |
echo { trunc 5.999 }
|
| 2. Expected output | 5 |