change prompt
[calc.git] / parser.c
index 2660b43365569ceab2a284b811e3d59c99effeca..cd0d6bfe6b4e33be2d574408ffe8664405d18b53 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -254,7 +254,7 @@ element_t *parser (char *str, char **next, int prio)
             (*str == '.') || (*str == '+') || (*str == '-')) {
             VERBOSE (DEBUG, PRINTOUT ("start processing value\n"));
             char *pt;
-            float value = strtof (str, &pt);
+            double value = strtod (str, &pt);
             VERBOSE (INFO, PRINTOUT ("Value: %f\n", value));
             if (str != pt) {
                 if (root == NULL) {
@@ -367,7 +367,7 @@ void help (void)
 {
     PRINTOUT ("calc is a simple calculator\n\n");
     PRINTOUT ("supported operators:\n");
-    PRINTOUT (" + - * / % ^\n\n");
+    PRINTOUT (" + - * / %% ^\n\n");
     PRINTOUT ("supported functions:\n");
     PRINTOUT (" pow sqrt cos sin atan log exp\n\n");
     PRINTOUT ("miscellaneous functions:\n");