{"id":"array-weighted-average","version":"1.0.0","description":"Compute an exact weighted mean of value and weight arrays and return one rounded decimal string.","supported_operations":["weighted average arrays","weighted mean of values with weights","calculate weighted arithmetic mean","average numbers using weights","exact decimal weighted average","combine scores with numeric weights"],"unsupported_operations":["negative statistical weights","streaming or grouped averages"],"semantics":["Uses sum(weight * value) / sum(weight); negative weights are rejected and zero total weight is not computable.","Parses finite JSON numbers through their JSON decimal spelling, computes rationally, then rounds once using IEEE 754-2019 section 4.3.","half_up rounds ties away from zero (for example, -2.5 rounds to -3 at zero decimal places)."],"limits":{"max_input_bytes":32768,"max_items":256,"max_decimal_chars":70,"max_total_decimal_chars":4096,"max_digits":64,"max_exponent_magnitude":100,"max_decimal_places":18,"max_iterations":256,"max_output_bytes":32768},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["values","weights","decimal_places","rounding_mode"],"properties":{"values":{"type":"array","minItems":1,"maxItems":256,"items":{"type":["string","number"]}},"weights":{"type":"array","minItems":1,"maxItems":256,"items":{"type":["string","number"]}},"decimal_places":{"type":"integer","minimum":0,"maximum":18},"rounding_mode":{"type":"string","enum":["half_even","half_up","toward_zero","toward_positive","toward_negative"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["result","standard_version"],"properties":{"result":{"type":"string"},"standard_version":{"type":"string","const":"IEEE 754-2019 section 4.3"}}},"examples":[{"input":{"values":["10","20"],"weights":["1","3"],"decimal_places":2,"rounding_mode":"half_even"},"output":{"result":"17.50","standard_version":"IEEE 754-2019 section 4.3"}},{"input":{"values":[1,2,3],"weights":[1,1,1],"decimal_places":0,"rounding_mode":"half_even"},"output":{"result":"2","standard_version":"IEEE 754-2019 section 4.3"}}],"execute_url":"/v1/tools/array-weighted-average/versions/1.0.0/execute"}