implement maths for floats
This commit is contained in:
parent
13e32ed4f2
commit
0c5dedb44e
1 changed files with 9 additions and 1 deletions
|
@ -268,6 +268,8 @@ pub fn plus(stack: &mut Stack) -> OError {
|
||||||
Mega,
|
Mega,
|
||||||
Long,
|
Long,
|
||||||
Int,
|
Int,
|
||||||
|
Float,
|
||||||
|
Double,
|
||||||
)
|
)
|
||||||
.spl(),
|
.spl(),
|
||||||
);
|
);
|
||||||
|
@ -286,6 +288,8 @@ pub fn minus(stack: &mut Stack) -> OError {
|
||||||
Mega,
|
Mega,
|
||||||
Long,
|
Long,
|
||||||
Int,
|
Int,
|
||||||
|
Float,
|
||||||
|
Double,
|
||||||
)
|
)
|
||||||
.spl(),
|
.spl(),
|
||||||
);
|
);
|
||||||
|
@ -304,6 +308,8 @@ pub fn slash(stack: &mut Stack) -> OError {
|
||||||
Mega,
|
Mega,
|
||||||
Long,
|
Long,
|
||||||
Int,
|
Int,
|
||||||
|
Float,
|
||||||
|
Double,
|
||||||
)
|
)
|
||||||
.spl(),
|
.spl(),
|
||||||
);
|
);
|
||||||
|
@ -322,6 +328,8 @@ pub fn star(stack: &mut Stack) -> OError {
|
||||||
Mega,
|
Mega,
|
||||||
Long,
|
Long,
|
||||||
Int,
|
Int,
|
||||||
|
Float,
|
||||||
|
Double,
|
||||||
)
|
)
|
||||||
.spl(),
|
.spl(),
|
||||||
);
|
);
|
||||||
|
@ -336,7 +344,7 @@ pub fn percent(stack: &mut Stack) -> OError {
|
||||||
a,
|
a,
|
||||||
b,
|
b,
|
||||||
rem,
|
rem,
|
||||||
stack.err(ErrorKind::InvalidCall("star".to_owned())),
|
stack.err(ErrorKind::InvalidCall("percent".to_owned())),
|
||||||
Mega,
|
Mega,
|
||||||
Long,
|
Long,
|
||||||
Int,
|
Int,
|
||||||
|
|
Loading…
Add table
Reference in a new issue