Opened 12 years ago

Last modified 11 years ago

#357 closed task

Implement `pow()' WCPS function — at Initial Version

Reported by: Piero Campalani Owned by: abeccati
Priority: critical Milestone: 9.0
Component: petascope Version: 8.4
Keywords: pow unary Cc: Peter Baumann
Complexity: Medium

Description

Despite all exponentialExpr are implemented in Petascope (see WCPS standard Sec.7.1.17), only pow(C,p) function is missing, and should be implemented despite easily reproducible by means of sequences of products.

Pow is a unary expression (src/main/java/petascope/wcps/server/core/UnaryOperationCoverageExpr.java).

Examples:

for c in (mean_summer_airtemp)
   return encode(
      coverage averagesOverTime
      over     $T t(1:5)
      values   pow($T,3),
   "csv")
for c in (mean_summer_airtemp)
  return encode(
       pow(c[x:"CRS:1"(100:101),y:"CRS:1"(300)],3),
    "csv")

See how other similar operators are implemented, e.g. log, ln, exp.

Change History (0)

Note: See TracTickets for help on using tickets.