From 3eb78a1ddb0ac78c4306f4b6d2f81f62d097179a Mon Sep 17 00:00:00 2001 From: "Dobbertin, Niclas" Date: Mon, 14 Oct 2024 23:19:55 +0200 Subject: bugfixes --- modeling/prod_subtraction.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'modeling/prod_subtraction.py') diff --git a/modeling/prod_subtraction.py b/modeling/prod_subtraction.py index b952dd9..dd60496 100644 --- a/modeling/prod_subtraction.py +++ b/modeling/prod_subtraction.py @@ -395,6 +395,25 @@ def subtraction(Model): """, ) + sub_hundreds_with_carry_0 = Model.productionstring( + name="sub_hundreds_with_carry_0", + string=""" + =g> + isa math_goal + op sub_hundreds + hundreds1 =num1 + hundreds2 0 + hundreds2 =num2 + tens_carry 1 + ==> + =g> + isa math_goal + op sub_done + hundreds_ans 0 + ~retrieval> + """, + ) + sub_hundreds_with_carry = Model.productionstring( name="sub_hundreds_with_carry", string=""" @@ -402,6 +421,7 @@ def subtraction(Model): isa math_goal op sub_hundreds hundreds1 =num1 + hundreds2 ~0 hundreds2 =num2 tens_carry 1 ?retrieval> @@ -563,7 +583,7 @@ def subtraction(Model): ==> =g> isa math_goal - op sub_hundreds + op sub_hundreds_done +retrieval> isa math_op op add @@ -577,7 +597,7 @@ def subtraction(Model): string=""" =g> isa math_goal - op sub_hundreds + op sub_hundreds_done hundreds1 =num1 hundreds2 =num2 =retrieval> -- cgit v1.2.3