Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/19 14:20:33 (5 years ago)
Author:
gkronber
Message:

#2915: Corrected calculation of cuberoot function in all interpreters and updated all formatters.
I tested a run with all interpreters and got the same results with all of them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/vector_operations.h

    r16701 r16905  
    1717#define hl_sqrt vdt::fast_sqrt
    1818#define hl_pow vdt::fast_pow
     19#define hl_cbrt std::cbrt
    1920#define hl_round vdt::fast_round
    2021#define hl_inv vdt::fast_inv
     
    2829#define hl_sqrt std::sqrt
    2930#define hl_pow std::pow
     31#define hl_cbrt std::cbrt
    3032#define hl_round std::round
    3133#define hl_inv(x) 1. / x;
     
    5658inline void pow(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = hl_pow(a[i], hl_round(b[i])); };
    5759inline void root(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = hl_pow(a[i], 1. / hl_round(b[i])); };
     60inline void cbrt(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = hl_cbrt(b[i]); };
    5861inline void square(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = hl_pow(b[i], 2.); };
    5962inline void inv(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = hl_inv(b[i]); }
     
    8184inline void round(double* __restrict a) noexcept { FOR(i) a[i] = hl_round(a[i]); }
    8285inline void square(double* __restrict a) noexcept { FOR(i) a[i] = hl_pow(a[i], 2.); }
     86inline void cbrt(double* __restrict a) noexcept { FOR(i) a[i] = hl_cbrt(a[i]); }
    8387
    8488#undef FOR
Note: See TracChangeset for help on using the changeset viewer.