using System;
using System.Collections.Generic;
using TSLab.Script.Handlers;
namespace YourNamespace {
[HandlerName("Fish")]
public class Fish : IDouble2DoubleHandler {
public IList<double> Execute(IList<double> source) {
int count = source.Count;
var result = new double[count];
for (int i = 0; i < count; i++) {
var v2 = 2*source[i];
result[i] = (Math.Exp(v2) - 1)/(Math.Exp(v2) + 1);
}
return result;
}
}
}