Skip to content

Commit

Permalink
7.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Eruhitsuji committed Sep 22, 2024
1 parent 59d6cdc commit 3a9a3dc
Show file tree
Hide file tree
Showing 14 changed files with 248 additions and 113 deletions.
2 changes: 1 addition & 1 deletion SFGPL/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__=(7,4,0)
__version_info__=(7,4,1)
__version__=".".join(map(str,__version_info__))
56 changes: 38 additions & 18 deletions docs/en/Number.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,17 @@ mi fa 'Japan' so ma fa 'people' so fol mul pel pil bal pol mol pel bel bul bil b

As shown in the following table, NumberList has functions that perform numerical calculations such as four arithmetic operations.

||SFGPL|
|:-:|:-:|
|Addition|tal|
|Subtraction|tel|
|Multiplication|til|
|Division|tul|
|Power|dal|
|Int Division|del|
|Remainder|dil|

### How to handle real numbers

When you want to deal with real numbers, use division.
For example, 3.14 can be expressed as follows.

```SFGPL
tul mil pul pel pol mil pel pal pal
```
||Python|SFGPL|
|:-:|:-:|:-:|
|Addition|```A+B```|tal A B|
|Subtraction|```A-B```|tel A B|
|Multiplication|```A*B```|til A B|
|Division|```A/B```|tul A B|
|Power|```A**B```|dal A B|
|Int Division|```A//B```|del A B|
|Remainder|```A%B```|dil A B|
|Minus|```-A```|sel A|
|Absolute value|```abs(A)```|sil A|

### Interconversion between BoolList and NumberList

Expand Down Expand Up @@ -120,6 +113,33 @@ The numbers handled by these conversions consider BoolList as a floating-point t
In other words, the BoolList values in this case use the half-precision, single-precision, double-precision, and quadruple-precision floating-point representation methods in IEEE754.
When converting from NumberList to BoolList, it is converted as a 64-bit double-precision floating-point number and stored in BoolList.

### How to handle real numbers

To handle real numbers, you can use NumberList division (```tul```), or you can represent floating-point numbers in a BoolList and convert it to a NumberList.

For example, 3.14 can be expressed by division as follows.

```SFGPL
tul mil pul pel pol mil pel pal pal
```

Similarly, to express 3.14 in double-precision floating point, do the following.

```SFGPL
dos fos fos fos mos pas pos pas pas pas pas pas pas mos pas pas pas pas pos pas pas pos fos mos pas pas pas pos pos pos pos pas mos pos pas pos pos pos pas pas pas fos fos mos pas pos pas pos pas pas pas pos mos pos pos pos pas pos pas pos pos fos mos pos pas pas pas pas pos pas pos mos pas pas pas pos pos pos pos pos
```

### Determination of positive numbers

To determine whether a NumberList is a positive number, use ```sal```.
This will output the SFGPL Bool type, which is equivalent to ```pos``` if the number is greater than or equal to zero.
For example, to determine whether an integer is positive in the two cases of 4 and -4, do the following.

```SFGPL
sal mal pol
sal sel mal pol
```

## Wordbook

|English|SFGPL|
Expand Down
59 changes: 40 additions & 19 deletions docs/en/SFGPL_docs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Introduction to the SFGPL
author: Eruhitsuji
date: 2024-09-21
date: 2024-09-22
---

<div class="tex_part" text="Overview and basic grammar of the SFGPL"></div>
Expand Down Expand Up @@ -2159,24 +2159,17 @@ mi fa 'Japan' so ma fa 'people' so fol mul pel pil bal pol mol pel bel bul bil b

As shown in the following table, NumberList has functions that perform numerical calculations such as four arithmetic operations.

||SFGPL|
|:-:|:-:|
|Addition|tal|
|Subtraction|tel|
|Multiplication|til|
|Division|tul|
|Power|dal|
|Int Division|del|
|Remainder|dil|

### How to handle real numbers

When you want to deal with real numbers, use division.
For example, 3.14 can be expressed as follows.

```SFGPL
tul mil pul pel pol mil pel pal pal
```
||Python|SFGPL|
|:-:|:-:|:-:|
|Addition|```A+B```|tal A B|
|Subtraction|```A-B```|tel A B|
|Multiplication|```A*B```|til A B|
|Division|```A/B```|tul A B|
|Power|```A**B```|dal A B|
|Int Division|```A//B```|del A B|
|Remainder|```A%B```|dil A B|
|Minus|```-A```|sel A|
|Absolute value|```abs(A)```|sil A|

### Interconversion between BoolList and NumberList

Expand Down Expand Up @@ -2204,6 +2197,33 @@ The numbers handled by these conversions consider BoolList as a floating-point t
In other words, the BoolList values in this case use the half-precision, single-precision, double-precision, and quadruple-precision floating-point representation methods in IEEE754.
When converting from NumberList to BoolList, it is converted as a 64-bit double-precision floating-point number and stored in BoolList.

### How to handle real numbers

To handle real numbers, you can use NumberList division (```tul```), or you can represent floating-point numbers in a BoolList and convert it to a NumberList.

For example, 3.14 can be expressed by division as follows.

```SFGPL
tul mil pul pel pol mil pel pal pal
```

Similarly, to express 3.14 in double-precision floating point, do the following.

```SFGPL
dos fos fos fos mos pas pos pas pas pas pas pas pas mos pas pas pas pas pos pas pas pos fos mos pas pas pas pos pos pos pos pas mos pos pas pos pos pos pas pas pas fos fos mos pas pos pas pos pas pas pas pos mos pos pos pos pas pos pas pos pos fos mos pos pas pas pas pas pos pas pos mos pas pas pas pos pos pos pos pos
```

### Determination of positive numbers

To determine whether a NumberList is a positive number, use ```sal```.
This will output the SFGPL Bool type, which is equivalent to ```pos``` if the number is greater than or equal to zero.
For example, to determine whether an integer is positive in the two cases of 4 and -4, do the following.

```SFGPL
sal mal pol
sal sel mal pol
```

## Wordbook

|English|SFGPL|
Expand Down Expand Up @@ -2695,4 +2715,5 @@ The content of updates due to changes in version names is based on the following
|7.3.1|Add and modify to documents|
|7.3.2|Add and modify to documents|
|7.4.0|Additional floating point conversions between BoolList and NumberList, additional operation types for NumberList|
|7.4.1|Add and modify to documents|

Binary file modified docs/en/SFGPL_docs.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions docs/en/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,4 @@ The content of updates due to changes in version names is based on the following
|7.3.1|Add and modify to documents|
|7.3.2|Add and modify to documents|
|7.4.0|Additional floating point conversions between BoolList and NumberList, additional operation types for NumberList|
|7.4.1|Add and modify to documents|
56 changes: 38 additions & 18 deletions docs/jp/Number.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,17 @@ mi fa 'Japan' so ma fa 'people' so fol mul pel pil bal pol mol pel bel bul bil b

そして,次の表のようにNumberListでは四則演算等の数値計算を行う関数が存在する.

||SFGPL|
|:-:|:-:|
|Addition|tal|
|Subtraction|tel|
|Multiplication|til|
|Division|tul|
|Power|dal|
|Int Division|del|
|Remainder|dil|

### 実数の扱い方

実数を扱うには除算を利用する.
例えば3.14を表すには次のようにする.

```SFGPL
tul mil pul pel pol mil pel pal pal
```
||Python|SFGPL|
|:-:|:-:|:-:|
|Addition|```A+B```|tal A B|
|Subtraction|```A-B```|tel A B|
|Multiplication|```A*B```|til A B|
|Division|```A/B```|tul A B|
|Power|```A**B```|dal A B|
|Int Division|```A//B```|del A B|
|Remainder|```A%B```|dil A B|
|Minus|```-A```|sel A|
|Absolute value|```abs(A)```|sil A|

### BoolListとNumberListの相互変換

Expand Down Expand Up @@ -120,6 +113,33 @@ tul mil pul pel pol mil pel pal pal
つまり,このときのBoolListの値は,IEEE754における半精度,単精度,倍精度,四倍精度の浮動小数点表現方法が用いられる.
また,NumberListからBoolListに変換する際には,64bitの倍精度浮動小数点数として変換され,BoolListに格納される.

### 実数の扱い方

実数を扱うためには,NumberListの除算(```tul```)を使用する方法と,BoolListで浮動小数点数を表しそれをNumberListに変換する方法がある.

例えば3.14を除算によって表すには次のようにする.

```SFGPL
tul mil pul pel pol mil pel pal pal
```

同様に,3.14を倍精度浮動小数点で表す場合は次のようにする.

```SFGPL
dos fos fos fos mos pas pos pas pas pas pas pas pas mos pas pas pas pas pos pas pas pos fos mos pas pas pas pos pos pos pos pas mos pos pas pos pos pos pas pas pas fos fos mos pas pos pas pos pas pas pas pos mos pos pos pos pas pos pas pos pos fos mos pos pas pas pas pas pos pas pos mos pas pas pas pos pos pos pos pos
```

### 正の数の判定

NumberListで正の数かを判定するには,```sal```を使用する.
これによって,SFGPLのBool型が出力され,0以上の数の場合が```pos```と同値になる.
例えば,4と-4の2つの場合において正の整数か判定するには次のようにする.

```SFGPL
sal mal pol
sal sel mal pol
```

## 単語集

|English|SFGPL|
Expand Down
59 changes: 40 additions & 19 deletions docs/jp/SFGPL_docs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: SFGPL入門
author: Eruhitsuji
date: 2024-09-21
date: 2024-09-22
---

<div class="tex_part" text="SFGPLの概要と基礎的な文法"></div>
Expand Down Expand Up @@ -2164,24 +2164,17 @@ mi fa 'Japan' so ma fa 'people' so fol mul pel pil bal pol mol pel bel bul bil b

そして,次の表のようにNumberListでは四則演算等の数値計算を行う関数が存在する.

||SFGPL|
|:-:|:-:|
|Addition|tal|
|Subtraction|tel|
|Multiplication|til|
|Division|tul|
|Power|dal|
|Int Division|del|
|Remainder|dil|

### 実数の扱い方

実数を扱うには除算を利用する.
例えば3.14を表すには次のようにする.

```SFGPL
tul mil pul pel pol mil pel pal pal
```
||Python|SFGPL|
|:-:|:-:|:-:|
|Addition|```A+B```|tal A B|
|Subtraction|```A-B```|tel A B|
|Multiplication|```A*B```|til A B|
|Division|```A/B```|tul A B|
|Power|```A**B```|dal A B|
|Int Division|```A//B```|del A B|
|Remainder|```A%B```|dil A B|
|Minus|```-A```|sel A|
|Absolute value|```abs(A)```|sil A|

### BoolListとNumberListの相互変換

Expand Down Expand Up @@ -2209,6 +2202,33 @@ tul mil pul pel pol mil pel pal pal
つまり,このときのBoolListの値は,IEEE754における半精度,単精度,倍精度,四倍精度の浮動小数点表現方法が用いられる.
また,NumberListからBoolListに変換する際には,64bitの倍精度浮動小数点数として変換され,BoolListに格納される.

### 実数の扱い方

実数を扱うためには,NumberListの除算(```tul```)を使用する方法と,BoolListで浮動小数点数を表しそれをNumberListに変換する方法がある.

例えば3.14を除算によって表すには次のようにする.

```SFGPL
tul mil pul pel pol mil pel pal pal
```

同様に,3.14を倍精度浮動小数点で表す場合は次のようにする.

```SFGPL
dos fos fos fos mos pas pos pas pas pas pas pas pas mos pas pas pas pas pos pas pas pos fos mos pas pas pas pos pos pos pos pas mos pos pas pos pos pos pas pas pas fos fos mos pas pos pas pos pas pas pas pos mos pos pos pos pas pos pas pos pos fos mos pos pas pas pas pas pos pas pos mos pas pas pas pos pos pos pos pos
```

### 正の数の判定

NumberListで正の数かを判定するには,```sal```を使用する.
これによって,SFGPLのBool型が出力され,0以上の数の場合が```pos```と同値になる.
例えば,4と-4の2つの場合において正の整数か判定するには次のようにする.

```SFGPL
sal mal pol
sal sel mal pol
```

## 単語集

|English|SFGPL|
Expand Down Expand Up @@ -2699,4 +2719,5 @@ SFGPLでは,```A.B.C```のようなバージョンを使用し,管理して
|7.3.1|ドキュメントの追加・修正|
|7.3.2|ドキュメントの追加・修正|
|7.4.0|BoolListとNumberList間の浮動小数点の変換の追加,NumberListの演算種類の追加|
|7.4.1|ドキュメントの追加・修正|

Binary file modified docs/jp/SFGPL_docs.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions docs/jp/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,4 @@ SFGPLでは,```A.B.C```のようなバージョンを使用し,管理して
|7.3.1|ドキュメントの追加・修正|
|7.3.2|ドキュメントの追加・修正|
|7.4.0|BoolListとNumberList間の浮動小数点の変換の追加,NumberListの演算種類の追加|
|7.4.1|ドキュメントの追加・修正|
13 changes: 11 additions & 2 deletions py/createDocs/Number.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"NumberList_calcPow":LangObj._getKeyOfDict("NumberList.calcPow"),
"NumberList_calcIntDiv":LangObj._getKeyOfDict("NumberList.calcIntDiv"),
"NumberList_calcMod":LangObj._getKeyOfDict("NumberList.calcMod"),

"real_number_3_14":NumberList.calcDiv(NumberList.digit3(Number.three(),Number.one(),Number.four()),NumberList.digit3(Number.one(),Number.zero(),Number.zero())),
"NumberList_minus":LangObj._getKeyOfDict("NumberList.minus"),
"NumberList_abs":LangObj._getKeyOfDict("NumberList.abs"),

"NumberList_IntNL2BL":LangObj._getKeyOfDict("NumberList.IntNL2BL"),
"BoolList_IntBL2NL":LangObj._getKeyOfDict("BoolList.IntBL2NL"),
Expand All @@ -54,6 +54,15 @@
"BoolList_Int":LangObj._getKeyOfDict("BoolList.Int"),
"BoolList_Float":LangObj._getKeyOfDict("BoolList.Float"),

"real_number_3_14_div":NumberList.calcDiv(NumberList.digit3(Number.three(),Number.one(),Number.four()),NumberList.digit3(Number.one(),Number.zero(),Number.zero())),
"real_number_3_14_bl":BoolList.FloatBL2NL(BoolList.float64Number2BoolListObj(3.14)),

"NumberList_isPN":LangObj._getKeyOfDict("NumberList.isPN"),
"Bool_true":LangObj._getKeyOfDict("Bool.true"),

"isPN_4":NumberList.isPN(NumberList.digit1(Number.four())),
"isPN_-4":NumberList.isPN(NumberList.minus(NumberList.digit1(Number.four()))),

}

createDocs(name=NAME,format_str_list=format_str_list,lang_mode="JP",md_mode=True,out_flag=True,all_docs_flag=True)
Expand Down
Loading

0 comments on commit 3a9a3dc

Please sign in to comment.