A list for the developers of CellML tools

Text archives Help


[cellml-dev] r2184 - pce/trunk/chrome/content/ui


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-dev] r2184 - pce/trunk/chrome/content/ui
  • Date: Fri, 04 Apr 2008 10:55:35 +1300

CellML Automated Notifications wrote:
> Author: jmar150
> Date: 2008-04-04 10:40:47 +1300 (Fri, 04 Apr 2008)
> New Revision: 2184
>
> Modified:
> pce/trunk/chrome/content/ui/ExportProcedural.js
> Log:
> Cleaning up some more cases for generating F77 code.
>
Hi,

One comment about this: I'm not sure that the precedences in the MAL
file are correct, and it seems that you have worked around this by
putting in additional brackets. The idea of the precedence system is
that brackets will be put in if, and only if, they are required. If you
do wrap something in brackets, I think it should be #prec[H], i.e. the
shorthand for #prec[0(1000)], but normally, it would be better not to
wrap it in brackets, and instead set the precedence values correctly so
the opengroup and closegroup are added automatically when needed.

Best regards,
Andrew
>
>
> Modified: pce/trunk/chrome/content/ui/ExportProcedural.js
> ===================================================================
> --- pce/trunk/chrome/content/ui/ExportProcedural.js 2008-04-03 07:59:42
> UTC (rev 2183)
> +++ pce/trunk/chrome/content/ui/ExportProcedural.js 2008-04-03 21:40:47
> UTC (rev 2184)
> @@ -207,7 +207,7 @@
> mal:
> "opengroup: (\r\n" +
> "closegroup: )\r\n" +
> -"abs: #prec[H]fabs(#expr1)\r\n" +
> +"abs: #prec[H]ABS(#expr1)\r\n" +
> "and: #prec[20]#exprs[.AND.]\r\n" +
> "arccos: #prec[H]acos(#expr1)\r\n" +
> "arccosh: #prec[H]acosh(#expr1)\r\n" +
> @@ -231,14 +231,14 @@
> "diff: #lookupDiffVariable\r\n" +
> "divide: #prec[900]#expr1/#expr2\r\n" +
> "eq: #prec[30]#exprs[.EQ.]\r\n" +
> -"exp: #prec[H]exp(#expr1)\r\n" +
> +"exp: #prec[H]EXP(#expr1)\r\n" +
> "factorial: #prec[H]factorial(#expr1)\r\n" +
> -"factorof: #prec[30(900)]#expr1 % #expr2 == 0\r\n" +
> -"floor: #prec[H]floor(#expr1)\r\n" +
> +"factorof: #prec[30(900)](MOD(#expr1, #expr2) .EQ. 0)\r\n" +
> +"floor: #prec[H]INT(#expr1)\r\n" +
> "gcd: #prec[H]gcd_multi(#count, #exprs[, ])\r\n" +
> "geq: #prec[30]#exprs[.GE.]\r\n" +
> "gt: #prec[30]#exprs[.GT.]\r\n" +
> -"implies: #prec[10(950)] .NOT.#expr1 .OR. #expr2\r\n" +
> +"implies: #prec[10(950)] (.NOT.#expr1 .OR. #expr2)\r\n" +
> "int: #prec[H]defint(func#unique1, BOUND, CONSTS, RATES, VARIABLES, " +
> "#bvarIndex)#supplement REAL function func#unique1(BOUND, " +
> "CONSTS, RATES, VARIABLES) \r \n func#unique1 = #expr1\r \n
> RETURN\r \n END\r\n" +
> @@ -255,8 +255,8 @@
> "or: #prec[10]#exprs[.OR.]\r\n" +
> "plus: #prec[500]#exprs[+]\r\n" +
> "power: #prec[H]#expr1 ** #expr2\r\n" +
> -"quotient: #prec[900(0)] (int)(#expr1) / (int)(#expr2)\r\n" +
> -"rem: #prec[900(0)] (int)(#expr1) % (int)(#expr2)\r\n" +
> +"quotient: #prec[900(0)] (INT(#expr1) / INT(#expr2))\r\n" +
> +"rem: #prec[900(0)] INT(MOD(#expr1, #expr2))\r\n" +
> "root: #prec[1000(900)] #expr1 ** (1.0 / #degree)\r\n" +
> "sec: #prec[900(0)]1.0 / cos(#expr1)\r\n" +
> "sech: #prec[900(0)]1.0 / cosh(#expr1)\r\n" +
>
> _______________________________________________
> automated-notifications mailing list
> automated-notifications at cellml.org
> http://www.cellml.org/mailman/listinfo/automated-notifications
>




  • [cellml-dev] r2184 - pce/trunk/chrome/content/ui, Andrew Miller, 04/04/2008

Archive powered by MHonArc 2.6.18.

Top of page