core.solve_for
Solves for a numeric input value via Decimal bisection within a specified interval so a read-only tool's target field matches a desired target, such as deriving gross pay from net pay.
Instructions
역산: 읽기 전용 도구 tool 의 결과 필드 target_field 가 target 이 되도록 숫자 문자열 입력 variable 을 [lower, upper] 에서 이분법(Decimal)으로 찾는다. 예: 세후 월급에서 세전 월급 구하기. 구간 양 끝의 함수값 부호가 달라야 하며 단계별 함수는 가장 가까운 해와 residual 을 반환한다. 잔차가 tolerance(기본 0.5) 이내면 converged 가 true 이고 max_iter(기본 100)는 최대 200이다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | ||
| lower | Yes | ||
| upper | Yes | ||
| target | Yes | ||
| integer | No | ||
| max_iter | No | ||
| variable | Yes | ||
| arguments | Yes | ||
| tolerance | No | 0.5 | |
| target_field | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) | |
| bracket | Yes | ||
| achieved | Yes | ||
| residual | Yes | ||
| solution | Yes | ||
| converged | Yes | ||
| iterations | Yes | ||
| at_solution | Yes | ||
| evaluations | Yes |