Skip to main content

agentchat.contrib.captainagent.tools.math.simplify_mixed_numbers

simplify_mixed_numbers

def simplify_mixed_numbers(numerator1, denominator1, numerator2, denominator2,
whole_number1, whole_number2)

Simplifies the sum of two mixed numbers and returns the result as a string in the format 'a b/c'.

Arguments:

  • numerator1 int - The numerator of the first fraction.
  • denominator1 int - The denominator of the first fraction.
  • numerator2 int - The numerator of the second fraction.
  • denominator2 int - The denominator of the second fraction.
  • whole_number1 int - The whole number part of the first mixed number.
  • whole_number2 int - The whole number part of the second mixed number.

Returns:

  • str - The simplified sum of the two mixed numbers as a string in the format 'a b/c'.