Changeset 16351 for branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter
- Timestamp:
- 12/08/18 07:43:41 (6 years ago)
- Location:
- branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/interpreter.h
r16350 r16351 101 101 break; 102 102 } 103 case OpCodes::Sqrt: 104 { 105 in.value = std::pow(code[in.childIndex].value, 1./2.); 106 break; 107 } 103 108 case OpCodes::Square: 104 109 { … … 106 111 break; 107 112 } 108 case OpCodes::Sqrt:109 {110 in.value = std::sqrt(code[in.childIndex].value);111 break;112 }113 case OpCodes::Square:114 {115 in.value = std::pow(code[in.childIndex].value, 2.);116 break;117 }118 113 case OpCodes::CubeRoot: 119 114 { … … 128 123 case OpCodes::Absolute: 129 124 { 130 in.value = std:: abs(code[in.childIndex].value);125 in.value = std::fabs(code[in.childIndex].value); 131 126 break; 132 127 } … … 262 257 case OpCodes::Sqrt: 263 258 { 264 sqrt(in.buf, code[in.childIndex].buf);259 pow(in.buf, code[in.childIndex].buf, 1./2.); 265 260 break; 266 261 } -
branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/vector_operations.h
r16349 r16351 53 53 inline void inv(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = 1. / b[i]; } 54 54 inline void neg(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = -b[i]; } 55 inline void abs(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = std:: abs(b[i]); }55 inline void abs(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = std::fabs(b[i]); } 56 56 inline void analytical_quotient(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] /= hl_sqrt(b[i]*b[i] + 1.); } 57 57 … … 71 71 inline void sin(double* __restrict a) noexcept { FOR(i) a[i] = hl_sin(a[i]); } 72 72 inline void cos(double* __restrict a) noexcept { FOR(i) a[i] = hl_cos(a[i]); } 73 inline void sqrt(double* __restrict a) noexcept { FOR(i) a[i] = hl_sqrt(a[i]); }74 73 inline void round(double* __restrict a) noexcept { FOR(i) a[i] = hl_round(a[i]); } 75 74 inline void square(double* __restrict a) noexcept { FOR(i) a[i] = hl_pow(a[i], 2.); }
Note: See TracChangeset
for help on using the changeset viewer.