• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

BASIC compiler/interpreter for PIC32MX/MZ-80K (suspended)


Commit MetaInfo

Revision155 (tree)
Time2016-08-24 06:44:27
Authorkmorimatsu

Log Message

Add ATAN2#() function.

Change Summary

Incremental Difference

--- mips/branches/zoea/compiler.h (revision 154)
+++ mips/branches/zoea/compiler.h (revision 155)
@@ -110,6 +110,7 @@
110110 FUNC_ASIN,
111111 FUNC_ACOS,
112112 FUNC_ATAN,
113+ FUNC_ATAN2,
113114 FUNC_SINH,
114115 FUNC_COSH,
115116 FUNC_TANH,
--- mips/branches/zoea/debug.c (revision 154)
+++ mips/branches/zoea/debug.c (revision 155)
@@ -139,11 +139,7 @@
139139
140140 static const char bastext[]=
141141 "CLS\n"
142-"for i=1 to 10\n"
143-" print i;\n"
144-" continue\n"
145-" print \"NG\";\n"
146-"next\n"
142+"print ATAN#(1/2),ATAN2#(1,2),ATAN2#(1,0),ATAN2#(-1,0),\n"
147143 "\n";
148144
149145 /*
--- mips/branches/zoea/function.c (revision 154)
+++ mips/branches/zoea/function.c (revision 155)
@@ -391,6 +391,8 @@
391391 err=float_1param_function(FUNC_ACOS);
392392 } else if (nextCodeIs("ATAN#(")) {
393393 err=float_1param_function(FUNC_ATAN);
394+ } else if (nextCodeIs("ATAN2#(")) {
395+ err=float_2param_function(FUNC_ATAN2);
394396 } else if (nextCodeIs("SINH#(")) {
395397 err=float_1param_function(FUNC_SINH);
396398 } else if (nextCodeIs("COSH#(")) {
--- mips/branches/zoea/help.txt (revision 154)
+++ mips/branches/zoea/help.txt (revision 155)
@@ -37,6 +37,9 @@
3737 スクリーン消去。
3838 COLOR x
3939 テキスト色指定。
40+CONTINUE
41+ FOR-NEXT, DO-LOOP, WHILE-WENDループ中で、以降のコードをスキップす
42+ る。
4043 CURSOR x,y
4144 カーソル位置指定。
4245 CDATA xxx[,yyy[,zzz[...]]]
@@ -247,6 +250,8 @@
247250 x# の逆正弦を実数値で返す。
248251 ATAN#(x#)
249252 x# の逆正接を実数値で返す。
253+ATAN2#(y#,x#)
254+ y#/x# の逆正接を実数値で返す。
250255 CEIL#(x#)
251256 x# 以上の最小の整数を実数値で返す。
252257 COS#(x#)
@@ -542,6 +547,11 @@
542547 てみて下さい。
543548
544549 <バージョン履歴>
550+・KM-1201 2016年?月公開。
551+ 1.CONTINUEステートメントを追加。
552+ 2.ATAN2#()関数を追加。
553+ 3.IF-THEN-ELSEステートメントでエラーがでる不具合を修正。
554+ 4.負の実数値の扱いにおける不具合を修正。
545555 ・KM-1200 2016年8月公開。
546556  1.グラフィックディスプレイ機能および、関連のステートメント群を追加。
547557  2.浮動小数点演算機能、及び、算術演算関数群を追加。
--- mips/branches/zoea/library.c (revision 154)
+++ mips/branches/zoea/library.c (revision 155)
@@ -767,6 +767,9 @@
767767 case FUNC_ATAN:
768768 v0=atanf(v0);
769769 break;
770+ case FUNC_ATAN2:
771+ v0=atan2f(v0,a0);
772+ break;
770773 case FUNC_SINH:
771774 v0=sinhf(v0);
772775 break;