summaryrefslogtreecommitdiffstats
path: root/res/values
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2014-11-25 18:46:17 -0800
committerHans Boehm <hboehm@google.com>2015-03-06 15:45:31 -0800
commit84614957604253d51296e06c97daced699a0a9de (patch)
tree45f357dd9d08ea01ee5073e0dda6728ebc7da884 /res/values
parent2d5303e87e3b7f23f626ca1fe32045352d96aea4 (diff)
downloadandroid_packages_apps_ExactCalculator-84614957604253d51296e06c97daced699a0a9de.tar.gz
android_packages_apps_ExactCalculator-84614957604253d51296e06c97daced699a0a9de.tar.bz2
android_packages_apps_ExactCalculator-84614957604253d51296e06c97daced699a0a9de.zip
Beginnings of ExactCalculator based on L
Replace the arity library with a new evaluation engine based on an open source "constructive reals" library. This provides answers that are correct to the last displayed digit, and can be scrolled to get more precision, with evaluation to additional precision proceeding on demand. This uses pieces of an old prototype calculator with a pre-Material-Design UI. Since the code structure of the KitKat and Lollipop calculators is quite different, this merge required major changes to make the pieces fit again. An egregious bug in the prototype related to the evaluation of the power operator was fixed. Many new UI bugs are introduced to compensate :-) Add separate buttons for inverse trig functions. Add long TODO lists for various missing pieces. This is really designed to get something up and running that looks like it has a Material Design UI. This version kind of works, though with many UI deficiencies. This addresses external issues 63368, 81089, and 80990. It partially address the degree vs radian (80330) issue as well, though we're still missing the UI for that. This fixes Bug:15284587 (More work is needed to make this interact correctly with keyboard support.) Degree/Radian mode is also internal Bug:17059768 This provides much more robust solutions to the following, which were previously fixed by favoring round numbers over precise solutions: Bug:15747298 Bug:15332726 Change-Id: Ib64ffcee9760a3195ae2a48302308eeb09a156bd
Diffstat (limited to 'res/values')
-rw-r--r--res/values/donottranslate_strings.xml2
-rw-r--r--res/values/strings.xml44
2 files changed, 42 insertions, 4 deletions
diff --git a/res/values/donottranslate_strings.xml b/res/values/donottranslate_strings.xml
index 69d2959..1ef264e 100644
--- a/res/values/donottranslate_strings.xml
+++ b/res/values/donottranslate_strings.xml
@@ -44,7 +44,5 @@
<!-- Equals operator (e.g. "1 + 2 = ?"). [CHAR_LIMIT=1] -->
<string name="eq">=</string>
- <!-- Result displayed when expression evaluates to infinity. [CHAR_LIMIT=1] -->
- <string name="inf">∞</string>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index bcdd55e..408d5ec 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -20,10 +20,14 @@
<!-- Name of the application. [CHAR_LIMIT=NONE] -->
<string name="app_name">Calculator</string>
- <!-- Error displayed when expression evaluates to NaN. [CHAR_LIMIT=14] -->
+ <!-- Error displayed when expression evaluates a function at undefined point. [CHAR_LIMIT=14] -->
<string name="error_nan">Not a number</string>
<!-- Error displayed when expression contains a syntax error. [CHAR_LIMIT=14] -->
- <string name="error_syntax">Error</string>
+ <string name="error_syntax">Malformed expression</string>
+ <!-- Error displayed when evaluation is manually aborted. [CHAR_LIMIT=14] -->
+ <string name="error_aborted">Aborted</string>
+ <!-- Error displayed when excessive precision is required. [CHAR_LIMIT=14] -->
+ <string name="error_overflow">Infinite?</string>
<!-- Decimal separator (e.g. "1.23"). [CHAR_LIMIT=1] -->
<string name="dec_point">.</string>
@@ -59,6 +63,14 @@
<string name="fun_sin">sin</string>
<!-- Abbrev. name of tangent function (e.g. "tan(π)". [CHAR_LIMIT=3] -->
<string name="fun_tan">tan</string>
+ <!-- Abbrev. name of cosine function (e.g. "arccos(π)". Often cos with a -1 superscript [CHAR_LIMIT=5] -->
+ <string name="fun_arccos">cos\u207B\u00B9</string>
+ <!-- Abbrev. name of sine function (e.g. "arcsin(π)". [CHAR_LIMIT=5] -->
+ <string name="fun_arcsin">sin\u207B\u00B9</string>
+ <!-- Abbrev. name of tangent function (e.g. "arctan(π)". [CHAR_LIMIT=5] -->
+ <string name="fun_arctan">tan\u207B\u00B9</string>
+ <!-- Ellipsis string used in display (e.g. "...". [CHAR_LIMIT=3] -->
+ <string name="ellipsis">\u2026</string>
<!-- Clear operation to clear the currently entered expression. [CHAR_LIMIT=3] -->
<string name="clr">clr</string>
@@ -91,6 +103,12 @@
<string name="desc_fun_sin">sine</string>
<!-- Content description for 'tan' button. [CHAR_LIMIT=NONE] -->
<string name="desc_fun_tan">tangent</string>
+ <!-- Content description for 'arccos' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_fun_arccos">inverse cosine</string>
+ <!-- Content description for 'arcsin' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_fun_arcsin">inverse sine</string>
+ <!-- Content description for 'arctan' button. [CHAR_LIMIT=NONE] -->
+ <string name="desc_fun_arctan">inverse tangent</string>
<!-- Content description for '+' button. [CHAR_LIMIT=NONE] -->
<string name="desc_op_add">plus</string>
@@ -114,4 +132,26 @@
<!-- Content description for '=' button. [CHAR_LIMIT=NONE] -->
<string name="desc_eq">equals</string>
+ <!-- TODO: Revisit everything below here -->
+ <!-- Displayed briefly to indicate not-yet-computed digit. -->
+ <string name="guessed_digit">"?"</string>
+ <!-- Dialog message when a computation is cancelled by the user. -->
+ <string name="cancelled">Computation cancelled!</string>
+ <!-- Button label to dismiss informative text message. -->
+ <string name="dismiss">Dismiss</string>
+ <!-- Dialog message when a computation times out. -->
+ <string name="timeout">Timed out trying to compute an infinite or huge number</string>
+ <!-- Button label for "remove timeout" button. -->
+ <string name="ok_remove_timeout">OK, but longer timeouts, please!</string>
+ <!-- Help menu entry for context menu. -->
+ <string name="help">Help!</string>
+ <!-- Content description for overflow menu button. -->
+ <string name="overflow_menu_description">overflow menu</string>
+ <!-- The help message that's displayed in response to pushing the above button. -->
+ <string name="help_message">Use the keys to enter a standard arithmetic expression. It\'s fine to omit multiplication symbols and trailing parentheses. The result displayed after hitting = is computed to an error of less than one in the last displayed digit. Drag the display to see more digits.\n\nComputations involving infinite values may take forever. Touch a button to terminate computation or wait for the timeout.</string>
+ <!-- Help message addendum for pager. -->
+ <string name="help_pager">\n\nSwipe the keyboard to the left to see additional functions.</string>
+ <!-- About menu entry; leads mostly to (English language!) copyright notice. -->
+ <string name="about">About &amp; Copyright</string>
+
</resources>