Is there a way to evaluate a string as a math expression in awk?
balter@spectre3:~$ echo \"sin(0.3) 0.3\" | awk \'{print $1,sin($2)}\' sin(0.3) 0.29552
You can try Perl as it has eval() function.
$ echo "sin(0.3)" | perl -ne ' print eval ' 0.29552020666134 $
For the given input,
$ echo "sin(0.3) 0.3" | perl -ne ' /(\S+)\s+(\S+)/ and print eval($1), " ", $2 ' 0.29552020666134 0.3 $