FloatValue extends Value<Float> { @Override public FloatValue exp(){ this.value = FloatValue.exp(this.value); return this; } @Operation ( value = "${0}" )  FloatValue(float value); @Operation ( value = "${0}" )  FloatValue(Number value); @Override int compareTo(Value<Float> that); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Override FloatValue copy(); @Override FloatValue add(Number value); @Override FloatValue add(Value<? extends Number> value); @Override FloatValue add(Number coefficient, Number factor); @Override FloatValue add(Number coefficient, Number firstFactor, Number secondFactor); @Override FloatValue add(Number coefficient, Number... factors); @Override FloatValue add(Number coefficient, Number factor, int exponent); @Override FloatValue subtract(Number value); @Override FloatValue subtract(Value<? extends Number> value); @Override FloatValue multiply(Number value); @Override FloatValue multiply(Value<? extends Number> value); @Override FloatValue multiply(Number factor, Number exponent); @Override FloatValue divide(Number value); @Override FloatValue divide(Value<? extends Number> value); @Override FloatValue residual(Value<? extends Number> value); @Override FloatValue square(); @Override FloatValue power(Number value); @Override FloatValue reciprocal(); @Override FloatValue elliott(); @Override FloatValue exp(); @Override FloatValue ln(); @Override FloatValue gauss(); @Override FloatValue inverseLogit(); @Override FloatValue inverseCloglog(); @Override FloatValue inverseLoglog(); @Override FloatValue inverseLogc(); @Override FloatValue inverseNegbin(Number value); @Override FloatValue inverseOddspower(Number value); @Override FloatValue inversePower(Number value); @Override FloatValue inverseCauchit(); @Override FloatValue inverseProbit(); @Override FloatValue sin(); @Override FloatValue cos(); @Override FloatValue arctan(); @Override FloatValue tanh(); @Override FloatValue threshold(Number value); @Override FloatValue relu(); @Override FloatValue abs(); @Override FloatValue gaussSim(Number value); @Override FloatValue restrict(Number lowValue, Number highValue); @Override FloatValue round(); @Override FloatValue ceiling(); @Override FloatValue floor(); @Override FloatValue normalize(Number leftOrig, Number leftNorm, Number rightOrig, Number rightNorm); @Override FloatValue denormalize(Number leftOrig, Number leftNorm, Number rightOrig, Number rightNorm); @Override boolean isZero(); @Override boolean isOne(); @Override boolean equals(Number value); @Override int compareTo(Number value); @Override float floatValue(); @Override double doubleValue(); @Override Float getValue(); static float exp(float value); static float pow(float value, float power); static final double E; static final double PI; }
@Test public void exp(){ assertTrue(Math.pow(2.7182817f, -7f) == Math.pow((float)Math.E, -7f)); assertTrue(Math.pow(2.7182817f, -7f) == Math.pow((float)2.7182817d, -7f)); assertFalse(Math.pow(2.7182817f, -7f) == Math.pow(2.7182817d, -7f)); assertTrue(FloatValue.exp(-7f) > (float)Math.exp(-7f)); assertTrue(FloatValue.exp(-7f) > (float)Math.pow((float)Math.E, -7f)); assertTrue(FloatValue.exp(0f) == (float)Math.exp(0f)); assertTrue(FloatValue.exp(0f) == (float)Math.pow((float)Math.E, 0f)); assertTrue(FloatValue.exp(7f) < (float)Math.exp(7f)); assertTrue(FloatValue.exp(7f) < (float)Math.pow((float)Math.E, 7f)); }