mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Compute power for real on the simulator.
Change-Id: I790f0b1216584835cd551893f16c052d21de7e31
This commit is contained in:
committed by
Félix Raimundo
parent
d1b14397ed
commit
a4e3f1e2d1
@@ -1,3 +1,7 @@
|
||||
#if PLATFORM==simulator
|
||||
#include <cmath>
|
||||
#endif
|
||||
|
||||
#include <poincare/power.h>
|
||||
#include "layout/exponent_layout.h"
|
||||
|
||||
@@ -12,8 +16,12 @@ Power::~Power() {
|
||||
}
|
||||
|
||||
float Power::approximate(Context& context) {
|
||||
// TODO: do this for real
|
||||
return 1;
|
||||
#if PLATFORM==simulator
|
||||
return powf(m_base->approximate(context), m_exponent->approximate(context));
|
||||
#else
|
||||
// TODO(fraimundo): do this for real
|
||||
return 1f;
|
||||
#endif
|
||||
}
|
||||
|
||||
ExpressionLayout * Power::createLayout(ExpressionLayout * parent) {
|
||||
|
||||
Reference in New Issue
Block a user