نیازمندی «تقسیم ولتاژ را درست حساب کن» بدون مدلِ بار خروجی کامل نیست. اگر ورودی ابزار را مقاومت محدودی فرض کنیم، اتصال آن نسبت تقسیم را تغییر می‌دهد؛ حتی وقتی نسبت دو مقاومتِ اصلی همان قبلی باشد. این درس با اعداد ساختگی، معیار پذیرش عددی و واحدها را روشن می‌کند. یک مدل DC ایدئال، جواب دستی و مرجع مستقل داریم؛ هیچ ولت‌متر، ADC یا مدار واقعی اندازه‌گیری نشده و دربارهٔ ایمنی یا حفاظت الکتریکی توصیه نمی‌کنیم.

۱. مدار و خروجی را با مرجع مشترک تعریف کنیم

منبع و دو مقاومت معلوم با نقطهٔ خروجیِ میانی و مرجع مشترک
تصویر مفهومی: منبع و دو مقاومت معلوم با نقطهٔ خروجیِ میانی و مرجع مشترک؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

منبع ایدئال Vin، مقاومت بالایی Rt و مقاومت پایینی Rb را به‌صورت سری تغذیه می‌کند. خروجی، ولتاژ گرهٔ میان آن‌ها نسبت به انتهای پایینی است؛ همان انتها مرجع مشترکِ منبع و ابزار است. در حالت بدون بار، نسبت ولتاژ g0=Rb/(Rt+Rb) است. برای Vin دوازده ولت و هر دو مقاومت ده‌هزار اهم، خروجیِ مرجع شش ولت می‌شود.

ابزار فرضی را فقط با یک مقاومت ورودی Rm مدل می‌کنیم که از همان گرهٔ میانی به مرجع وصل است؛ پس Rm با Rb موازی می‌شود، نه با Rt و نه در مسیر سری منبع. یادداشت فنی NI دربارهٔ اثر مقاومت ورودی ابزار، اصل بارگذاری مقاومتی را توضیح می‌دهد. از آن، مشخصات یا کاراییِ ابزار واقعی استخراج نمی‌کنیم.

در این قرارداد، Vin صفر یا عددی بین ده به توان منفی نه و صد ولت است. Rt و Rb هرکدام بین یک تا یک‌میلیارد اهم و Rm محدود بین یک تا ده به توان دوازده اهم قرار دارند؛ دو انتها پذیرفته‌اند. این کران‌ها فقط دامنهٔ آموزشی محاسبه‌اند، نه توان نامی قطعه یا ولتاژ مجاز اتصال. خازن ورودی، مقاومت خروجی منبع و جریان نشتی در مدل نیستند.

۲. خطای بارگذاری را نسبت به چه چیزی می‌سنجیم؟

بار مقاومتیِ موازی با مقاومت پایینی و مسیر جریان افزوده
تصویر مفهومی: بار مقاومتیِ موازی با مقاومت پایینی و مسیر جریان افزوده؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

روابط مقاومت‌های سری و موازی می‌گویند مقاومت معادل شاخهٔ پایین Rp=Rb*Rm/(Rb+Rm) است. نسبتِ زیر بار برابر Rp/(Rt+Rp) می‌شود. اگر Rm نیز ده‌هزار اهم باشد، Rp پنج‌هزار و خروجی دوازده‌ولتی، چهار ولت است؛ افت نسبت به خروجیِ بدون بار، دو ولت خواهد بود. این افت، خطای خودِ مدل ایدئال نیست؛ تفاوت دو وضعیت بارگذاری است.

کاهش نسبی بهره را (g0−gL)/g0 تعریف می‌کنیم. در نمونه، یک‌سوم یا حدود ۳۳٫۳۳ درصد است؛ عدد ۰٫۳۳۳ و عدد ۳۳٫۳۳ واحد گزارش یکسانی ندارند. برای Vin مثبت، این نسبت با (V0−VL)/V0 در مدل ریاضی یکسان است. در Vin صفر، هر دو ولتاژ صفرند و نسبت ولتاژی تعریف نمی‌شود؛ کد None می‌دهد، ولی مقایسهٔ دو بهره همچنان معنی دارد.

با Rth=Rt*Rb/(Rt+Rb)، همان کاهش بهره برابر Rth/(Rm+Rth) است. Rth مقاومت معادل توننِ تقسیم‌کنندهٔ ایدئال از سمت خروجی، با صفرکردن منبع ولتاژ ایدئال است. در مثال، پنج‌هزار اهم می‌شود. این بازنویسی برای فهم حساسیت به بار مفید است؛ مقاومت ورودیِ ابزار واقعی ممکن است با فرکانس و وضعیت اندازه‌گیری رفتار دیگری داشته باشد.

۳. کد کامل با حالت بدون بارِ صریح

حالت ورودی بسیار پرامپدانس با شاخهٔ ابزارِ جداشده
تصویر مفهومی: حالت ورودی بسیار پرامپدانس با شاخهٔ ابزارِ جداشده؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

None برای Rm به معنی شاخهٔ بازِ ایدئال است؛ عدد float بی‌نهایت پذیرفته نمی‌شود. این شاخه، حدِ ریاضیِ مقاومت ورودیِ رو به بی‌نهایت را نمایندگی می‌کند، نه رتبه‌بندی یک ابزار. با Rmهای ده‌هزار، یک‌میلیون، یک‌میلیارد و ده به توان دوازده اهم، خروجی‌های نمونه به شش ولت نزدیک می‌شوند. آخرین مقدار حدود ۵٫۹۹۹۹۹۹۹۷ است؛ مقاومت بزرگِ متناهی را بی‌نهایت نام نمی‌گذاریم.

"""Original ideal DC loaded-divider acceptance and independent rational reference."""
import itertools
import json
import math
import platform
from fractions import Fraction


def bounded(value,low,high):
    if type(value)not in(int,float):raise TypeError('exact int or float required, bool excluded')
    try:value=float(value)
    except OverflowError as error:raise ValueError('outside float representation')from error
    if not math.isfinite(value)or not low<=value<=high:raise ValueError('outside authored finite bounds')
    return value


def divider(vin,rtop,rbottom,rmeter=None,voltage_unit='V',resistance_unit='ohm'):
    if type(voltage_unit)is not str or voltage_unit!='V' or type(resistance_unit)is not str or resistance_unit!='ohm':
        raise ValueError('explicit V and ohm units required')
    vin=bounded(vin,0,100)
    if 0<vin<1e-9:raise ValueError('nonzero source must be at least 1e-9 V in this bounded lesson')
    rt=bounded(rtop,1,10**9)
    rb=bounded(rbottom,1,10**9)
    rm=None if rmeter is None else bounded(rmeter,1,10**12)
    ratio=rt/rb
    loading=0.0 if rm is None else rt/rm
    denominator=math.fsum((1.0,ratio,loading))
    unloaded_gain=1/(1+ratio)
    loaded_gain=1/denominator
    gain_loss=loading/denominator
    v0=vin*unloaded_gain
    loaded=vin*loaded_gain
    # Algebraic loading drop, avoids subtraction of two already-rounded outputs.
    drop=vin*unloaded_gain*gain_loss
    rth=rt/(1+ratio)
    result={'unloaded_voltage_v':v0,'loaded_voltage_v':loaded,'unloaded_gain':unloaded_gain,'loaded_gain':loaded_gain,
            'gain_loading_loss_fraction':gain_loss,'gain_loading_loss_percent':100*gain_loss,
            'voltage_relative_loading_loss_fraction':gain_loss if vin>0 else None,
            'absolute_loading_drop_v':drop,'thevenin_resistance_ohm':rth,'meter_model':'open circuit (None)'if rm is None else'finite resistance parallel to bottom resistor'}
    if not all(math.isfinite(x)for x in result.values()if type(x)is float):raise ArithmeticError('nonfinite derived output')
    return result


def reference(vin,rtop,rbottom,rmeter):
    vin,rt,rb=(Fraction.from_float(float(v))for v in(vin,rtop,rbottom))
    rm=None if rmeter is None else Fraction.from_float(float(rmeter))
    parallel=rb if rm is None else rb*rm/(rb+rm)
    unloaded_gain=rb/(rt+rb)
    loaded_gain=parallel/(rt+parallel)
    return {'unloaded_voltage_v':vin*unloaded_gain,'loaded_voltage_v':vin*loaded_gain,
            'gain_loading_loss_fraction':(unloaded_gain-loaded_gain)/unloaded_gain,
            'absolute_loading_drop_v':vin*(unloaded_gain-loaded_gain)}


def _raises(expected,function,*args):
    try:function(*args)
    except expected:return True
    return False


def close(a,b,absolute=1e-11,relative=1e-12):
    return math.isclose(a,float(b),abs_tol=absolute,rel_tol=relative)


def run_example():
    hand=divider(12,10000,10000,10000)
    ideal=divider(12,10000,10000,None)
    zero=divider(0,10000,10000,10000)
    increasing=[divider(12,10000,10000,rm)for rm in(10000,10**6,10**9,10**12)]
    pass_budget=divider(12,10000,10000,500000)
    fail_budget=divider(12,10000,10000,490000)
    scaled_all=divider(12,100000,100000,100000)
    scaled_divider_only=divider(12,100000,100000,10000)
    scaled_source=divider(24,10000,10000,10000)
    thevenin_example=divider(12,20000,10000,1000000)
    ref_cases=[];passive=[];errors=[]
    for vin,rt,rb,rm in itertools.product((0,1,12,100),(1,10000,10**9),(1,10000,10**9),(None,1,10000,10**12)):
        actual=divider(vin,rt,rb,rm);expected=reference(vin,rt,rb,rm)
        ref_cases.append(all(close(actual[key],expected[key])for key in expected))
        errors.append(abs(actual['loaded_voltage_v']-float(expected['loaded_voltage_v'])))
        passive.append(0<=actual['loaded_voltage_v']<=actual['unloaded_voltage_v']+1e-12<=vin+1e-12
                       and 0<=actual['gain_loading_loss_fraction']<1)
    rth_reference=Fraction(20000*10000,20000+10000)
    loss_reference=rth_reference/(1000000+rth_reference)
    checks={
        'hand_twelve_volt_equal_divider_is_six_unloaded_four_loaded': close(hand['unloaded_voltage_v'],6)and close(hand['loaded_voltage_v'],4),
        'hand_loading_loss_is_one_third_and_two_volt_drop': close(hand['gain_loading_loss_fraction'],Fraction(1,3))and close(hand['absolute_loading_drop_v'],2),
        'none_meter_is_explicit_open_circuit_not_float_infinity': ideal['loaded_voltage_v']==ideal['unloaded_voltage_v']==6 and ideal['gain_loading_loss_fraction']==ideal['absolute_loading_drop_v']==0,
        'larger_finite_meter_resistance_reduces_loading_in_authored_sequence': all(a['loaded_voltage_v']<b['loaded_voltage_v']and a['gain_loading_loss_fraction']>b['gain_loading_loss_fraction']for a,b in zip(increasing,increasing[1:])),
        'finite_large_resistance_approaches_but_is_not_relabelled_infinite': 0<ideal['loaded_voltage_v']-increasing[-1]['loaded_voltage_v']<3.1e-8,
        'zero_source_has_zero_voltages_and_undefined_voltage_relative_loss': zero['loaded_voltage_v']==zero['unloaded_voltage_v']==zero['absolute_loading_drop_v']==0
            and zero['voltage_relative_loading_loss_fraction']is None and close(zero['gain_loading_loss_fraction'],Fraction(1,3)),
        'bounded_passive_grid_output_and_loss_ranges': len(passive)==144 and all(passive),
        'one_percent_acceptance_pair_has_independent_margin_not_boundary_rounding': close(pass_budget['gain_loading_loss_fraction'],Fraction(1,101))
            and close(fail_budget['gain_loading_loss_fraction'],Fraction(1,99))and pass_budget['gain_loading_loss_fraction']<.01<fail_budget['gain_loading_loss_fraction'],
        'thevenin_parallel_reference_matches_loading_loss': close(thevenin_example['thevenin_resistance_ohm'],rth_reference)
            and close(thevenin_example['gain_loading_loss_fraction'],loss_reference),
        'common_scaling_all_three_resistors_preserves_gain_and_loading': close(scaled_all['loaded_voltage_v'],hand['loaded_voltage_v'])and close(scaled_all['gain_loading_loss_fraction'],hand['gain_loading_loss_fraction']),
        'same_unloaded_ratio_does_not_fix_loading_with_unchanged_meter': scaled_divider_only['unloaded_gain']==hand['unloaded_gain']
            and scaled_divider_only['loaded_voltage_v']<hand['loaded_voltage_v']and scaled_divider_only['gain_loading_loss_fraction']>hand['gain_loading_loss_fraction'],
        'source_scaling_doubles_voltages_drop_but_not_relative_loss': close(scaled_source['loaded_voltage_v'],2*hand['loaded_voltage_v'])
            and close(scaled_source['absolute_loading_drop_v'],2*hand['absolute_loading_drop_v'])and scaled_source['gain_loading_loss_fraction']==hand['gain_loading_loss_fraction'],
        'independent_fraction_parallel_then_series_oracle_one_hundred_forty_four_cases': len(ref_cases)==144 and all(ref_cases),
        'fraction_and_percentage_are_distinct_reported_quantities': close(hand['gain_loading_loss_percent'],Fraction(100,3))
            and hand['gain_loading_loss_percent']==100*hand['gain_loading_loss_fraction'],
        'exact_unit_codes_prevent_silent_kiloohm_or_millivolt_coercion': _raises(ValueError,divider,12,10,10,10,'mV','ohm')
            and _raises(ValueError,divider,12,10,10,10,'V','kohm')and _raises(ValueError,divider,12,10,10,10,None,'ohm'),
        'source_type_finiteness_zero_and_nonzero_voltage_bounds_enforced': all(_raises((TypeError,ValueError),divider,x,10000,10000,10000)for x in(True,'12',None,math.nan,math.inf,-1,1e-10,101,10**400))
            and divider(1e-9,10000,10000,10000)['loaded_voltage_v']>0,
        'positive_finite_divider_resistor_bounds_enforced_for_both_branches': all(_raises((TypeError,ValueError),divider,12,x,10000,10000)
            and _raises((TypeError,ValueError),divider,12,10000,x,10000)for x in(False,0,-1,.5,10**9+1,math.nan,math.inf,'10000')),
        'meter_requires_none_or_positive_bounded_finite_resistance': all(_raises((TypeError,ValueError),divider,12,10000,10000,x)for x in(False,0,-1,.5,10**12+1,math.nan,math.inf,'inf')),
    }
    assert len(checks)==18 and all(type(v)is bool and v for v in checks.values())
    return {'runtime':{'python':platform.python_version(),'arithmetic':'stdlib float production; Fraction exact represented-input parallel/series reference'},
            'contract':{'source_zero_allowed':True,'source_nonzero_v_inclusive':[1e-9,100],'divider_resistor_ohm_inclusive':[1,10**9],'meter_resistor_ohm_inclusive':[1,10**12],
                        'meter_none':'explicit ideal open circuit; no float infinity accepted','model':'ideal DC source, top resistor in series with parallel(bottom,meter), output across parallel branch',
                        'loss':'gain_loading_loss=(unloaded_gain-loaded_gain)/unloaded_gain; voltage-relative loss undefined at source zero; percent=100*fraction'},
            'metrics':{'hand_loaded_divider':hand,'ideal_no_meter':ideal,'increasing_meter_resistance_sequence':increasing,'one_percent_budget_pass_500kohm':pass_budget,
                       'one_percent_budget_fail_490kohm':fail_budget,'same_ratio_larger_divider_resistors_fixed_meter':scaled_divider_only,
                       'independent_fraction_reference_cases':len(ref_cases),'max_reference_output_difference_v':max(errors),
                       'fixture_compare_tolerance':{'absolute_in_compared_quantity_unit':1e-11,'quantity_units':['V','ohm','dimensionless'],'relative':1e-12}},
            'checks':checks,
            'limitations':['Ideal resistive DC synthetic model, not actual voltmeter/ADC input impedance across frequency or calibration evidence.',
                           'No capacitor, source output impedance, bias/leakage current, noise, component tolerance, thermal drift, safety protection or voltage-rating design implemented.',
                           'Exact Fraction oracle refers to actual float inputs; bounded comparisons and stable algebraic drop do not promise universal correct rounding or hardware accuracy.',
                           'One-percent decision uses examples on either side with margin; no claim about exact classification of arbitrarily close floating thresholds.']}


if __name__=='__main__':
    print(json.dumps(run_example(),ensure_ascii=False,indent=2))

تابع فقط int یا float دقیق را پس از تبدیلِ متناهی می‌پذیرد؛ bool، رشته، NaN، بی‌نهایت و مقدار بیرون کران رد می‌شوند. واحدها باید دقیقاً V و ohm باشند؛ kΩ و mV تبدیل خودکار نمی‌سازند. کفِ ولتاژ غیرصفر نیز برای محدودکردن دامنه و دورماندن از مقدارهای بسیار ریز انتخاب شده است؛ تغییر این کران‌ها بدون مرجع و آزمون تازه، گسترشِ تأییدشده نیست.

مسیر اصلی از نسبت‌های a=Rt/Rb و b=Rt/Rm استفاده می‌کند؛ gL=۱/(۱+a+b) و کاهش بهره b/(۱+a+b) است. افت مطلق نیز از Vin*g0*loss محاسبه می‌شود، نه تفاضل دو خروجیِ ازپیش‌گردشده. این انتخاب به حفظ افت کوچک کمک می‌کند، ولی دقت همگانیِ تمام ورودی‌ها را تضمین نمی‌کند. تبدیل اولیه به float، ارقامِ ازدست‌رفتهٔ ورودی را برنمی‌گرداند.

۴. بودجهٔ یک‌درصد و مرجع کسریِ مستقل

مقایسهٔ خطای بارگذاری با قطعات مرجع و دو انتخابِ مقاومت بار
تصویر مفهومی: مقایسهٔ خطای بارگذاری با قطعات مرجع و دو انتخابِ مقاومت بار؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

یک معیار آموزشی می‌گذاریم: کاهش بهره کمتر از یک درصد باشد. برای همان تقسیم‌کنندهٔ ده‌هزار/ده‌هزار، Rm برابر پانصدهزار اهم کاهش ۱/۱۰۱، حدود ۰٫۹۹۰۱ درصد، دارد و می‌گذرد. با ۴۹۰هزار اهم، کاهش ۱/۹۹، حدود ۱٫۰۱۰۱ درصد، است و رد می‌شود. این دو شاهد عمداً از مرز فاصله دارند؛ طبقه‌بندی بی‌خطای هر عدد ممیز شناورِ چسبیده به آستانه را ادعا نمی‌کنیم.

{
  "runtime": {
    "python": "3.14.5",
    "arithmetic": "stdlib float production; Fraction exact represented-input parallel/series reference"
  },
  "contract": {
    "source_zero_allowed": true,
    "source_nonzero_v_inclusive": [
      1e-09,
      100
    ],
    "divider_resistor_ohm_inclusive": [
      1,
      1000000000
    ],
    "meter_resistor_ohm_inclusive": [
      1,
      1000000000000
    ],
    "meter_none": "explicit ideal open circuit; no float infinity accepted",
    "model": "ideal DC source, top resistor in series with parallel(bottom,meter), output across parallel branch",
    "loss": "gain_loading_loss=(unloaded_gain-loaded_gain)/unloaded_gain; voltage-relative loss undefined at source zero; percent=100*fraction"
  },
  "metrics": {
    "hand_loaded_divider": {
      "unloaded_voltage_v": 6.0,
      "loaded_voltage_v": 4.0,
      "unloaded_gain": 0.5,
      "loaded_gain": 0.3333333333333333,
      "gain_loading_loss_fraction": 0.3333333333333333,
      "gain_loading_loss_percent": 33.33333333333333,
      "voltage_relative_loading_loss_fraction": 0.3333333333333333,
      "absolute_loading_drop_v": 2.0,
      "thevenin_resistance_ohm": 5000.0,
      "meter_model": "finite resistance parallel to bottom resistor"
    },
    "ideal_no_meter": {
      "unloaded_voltage_v": 6.0,
      "loaded_voltage_v": 6.0,
      "unloaded_gain": 0.5,
      "loaded_gain": 0.5,
      "gain_loading_loss_fraction": 0.0,
      "gain_loading_loss_percent": 0.0,
      "voltage_relative_loading_loss_fraction": 0.0,
      "absolute_loading_drop_v": 0.0,
      "thevenin_resistance_ohm": 5000.0,
      "meter_model": "open circuit (None)"
    },
    "increasing_meter_resistance_sequence": [
      {
        "unloaded_voltage_v": 6.0,
        "loaded_voltage_v": 4.0,
        "unloaded_gain": 0.5,
        "loaded_gain": 0.3333333333333333,
        "gain_loading_loss_fraction": 0.3333333333333333,
        "gain_loading_loss_percent": 33.33333333333333,
        "voltage_relative_loading_loss_fraction": 0.3333333333333333,
        "absolute_loading_drop_v": 2.0,
        "thevenin_resistance_ohm": 5000.0,
        "meter_model": "finite resistance parallel to bottom resistor"
      },
      {
        "unloaded_voltage_v": 6.0,
        "loaded_voltage_v": 5.9701492537313445,
        "unloaded_gain": 0.5,
        "loaded_gain": 0.49751243781094534,
        "gain_loading_loss_fraction": 0.0049751243781094535,
        "gain_loading_loss_percent": 0.49751243781094534,
        "voltage_relative_loading_loss_fraction": 0.0049751243781094535,
        "absolute_loading_drop_v": 0.02985074626865672,
        "thevenin_resistance_ohm": 5000.0,
        "meter_model": "finite resistance parallel to bottom resistor"
      },
      {
        "unloaded_voltage_v": 6.0,
        "loaded_voltage_v": 5.999970000149999,
        "unloaded_gain": 0.5,
        "loaded_gain": 0.49999750001249993,
        "gain_loading_loss_fraction": 4.9999750001249995e-06,
        "gain_loading_loss_percent": 0.0004999975000125,
        "voltage_relative_loading_loss_fraction": 4.9999750001249995e-06,
        "absolute_loading_drop_v": 2.9999850000749997e-05,
        "thevenin_resistance_ohm": 5000.0,
        "meter_model": "finite resistance parallel to bottom resistor"
      },
      {
        "unloaded_voltage_v": 6.0,
        "loaded_voltage_v": 5.99999997,
        "unloaded_gain": 0.5,
        "loaded_gain": 0.4999999975,
        "gain_loading_loss_fraction": 4.9999999750000005e-09,
        "gain_loading_loss_percent": 4.999999975e-07,
        "voltage_relative_loading_loss_fraction": 4.9999999750000005e-09,
        "absolute_loading_drop_v": 2.9999999850000005e-08,
        "thevenin_resistance_ohm": 5000.0,
        "meter_model": "finite resistance parallel to bottom resistor"
      }
    ],
    "one_percent_budget_pass_500kohm": {
      "unloaded_voltage_v": 6.0,
      "loaded_voltage_v": 5.9405940594059405,
      "unloaded_gain": 0.5,
      "loaded_gain": 0.49504950495049505,
      "gain_loading_loss_fraction": 0.009900990099009901,
      "gain_loading_loss_percent": 0.9900990099009901,
      "voltage_relative_loading_loss_fraction": 0.009900990099009901,
      "absolute_loading_drop_v": 0.0594059405940594,
      "thevenin_resistance_ohm": 5000.0,
      "meter_model": "finite resistance parallel to bottom resistor"
    },
    "one_percent_budget_fail_490kohm": {
      "unloaded_voltage_v": 6.0,
      "loaded_voltage_v": 5.9393939393939394,
      "unloaded_gain": 0.5,
      "loaded_gain": 0.494949494949495,
      "gain_loading_loss_fraction": 0.010101010101010102,
      "gain_loading_loss_percent": 1.0101010101010102,
      "voltage_relative_loading_loss_fraction": 0.010101010101010102,
      "absolute_loading_drop_v": 0.06060606060606061,
      "thevenin_resistance_ohm": 5000.0,
      "meter_model": "finite resistance parallel to bottom resistor"
    },
    "same_ratio_larger_divider_resistors_fixed_meter": {
      "unloaded_voltage_v": 6.0,
      "loaded_voltage_v": 1.0,
      "unloaded_gain": 0.5,
      "loaded_gain": 0.08333333333333333,
      "gain_loading_loss_fraction": 0.8333333333333334,
      "gain_loading_loss_percent": 83.33333333333334,
      "voltage_relative_loading_loss_fraction": 0.8333333333333334,
      "absolute_loading_drop_v": 5.0,
      "thevenin_resistance_ohm": 50000.0,
      "meter_model": "finite resistance parallel to bottom resistor"
    },
    "independent_fraction_reference_cases": 144,
    "max_reference_output_difference_v": 1.4210854715202004e-14,
    "fixture_compare_tolerance": {
      "absolute_in_compared_quantity_unit": 1e-11,
      "quantity_units": [
        "V",
        "ohm",
        "dimensionless"
      ],
      "relative": 1e-12
    }
  },
  "checks": {
    "hand_twelve_volt_equal_divider_is_six_unloaded_four_loaded": true,
    "hand_loading_loss_is_one_third_and_two_volt_drop": true,
    "none_meter_is_explicit_open_circuit_not_float_infinity": true,
    "larger_finite_meter_resistance_reduces_loading_in_authored_sequence": true,
    "finite_large_resistance_approaches_but_is_not_relabelled_infinite": true,
    "zero_source_has_zero_voltages_and_undefined_voltage_relative_loss": true,
    "bounded_passive_grid_output_and_loss_ranges": true,
    "one_percent_acceptance_pair_has_independent_margin_not_boundary_rounding": true,
    "thevenin_parallel_reference_matches_loading_loss": true,
    "common_scaling_all_three_resistors_preserves_gain_and_loading": true,
    "same_unloaded_ratio_does_not_fix_loading_with_unchanged_meter": true,
    "source_scaling_doubles_voltages_drop_but_not_relative_loss": true,
    "independent_fraction_parallel_then_series_oracle_one_hundred_forty_four_cases": true,
    "fraction_and_percentage_are_distinct_reported_quantities": true,
    "exact_unit_codes_prevent_silent_kiloohm_or_millivolt_coercion": true,
    "source_type_finiteness_zero_and_nonzero_voltage_bounds_enforced": true,
    "positive_finite_divider_resistor_bounds_enforced_for_both_branches": true,
    "meter_requires_none_or_positive_bounded_finite_resistance": true
  },
  "limitations": [
    "Ideal resistive DC synthetic model, not actual voltmeter/ADC input impedance across frequency or calibration evidence.",
    "No capacitor, source output impedance, bias/leakage current, noise, component tolerance, thermal drift, safety protection or voltage-rating design implemented.",
    "Exact Fraction oracle refers to actual float inputs; bounded comparisons and stable algebraic drop do not promise universal correct rounding or hardware accuracy.",
    "One-percent decision uses examples on either side with margin; no claim about exact classification of arbitrarily close floating thresholds."
  ]
}

کد با Python 3.14.5 اجرا شده است. مرجع مستقل با Fraction.from_float مقدار دقیقِ همان floatهای ورودی را می‌گیرد؛ ابتدا مقاومت موازی و سپس تقسیم سری را با کسر دقیق حساب می‌کند. مسیر اصلی، نسبت‌های شناور را مستقیم جمع می‌کند. صد‌وچهل‌وچهار ترکیب، یک گروه از هجده گروه‌اند؛ پاسخ دستی و خاصیت‌های محدود، شاهد مکمل‌اند، نه اجرای تکراریِ همان مرجع.

بیشترین اختلاف خروجی در این مجموعه حدود ۱٫۴۲ ضرب‌در ده به توان منفی چهارده ولت بود. تلورانس مقایسه، مطلق ده به توان منفی یازده در واحد همان کمیت و نسبی ده به توان منفی دوازده است. این عددها دقت فیزیکی ابزار نیستند. یادداشت NI، اثرهای خازنی و زمان نشست را نیز مطرح می‌کند؛ این برنامه آن بخش‌ها، نویز، تلورانس مقاومت و گرمایش را حساب نکرده است.

ده‌برابر کردن هر سه مقاومت، نسبت‌ها و بارگذاری را حفظ می‌کند. اما اگر فقط Rt و Rb را ده‌برابر و Rm را ثابت نگه داریم، خروجیِ بدون بار هنوز شش ولت و خروجی زیر بارِ مثال یک ولت می‌شود. پس نسبت تقسیمِ بدون بار به‌تنهایی کافی نیست. آزمون مدار دوگرهی و آزمون درون‌یابی حسگر پرسش‌های متفاوتی دارند. منابع در ۲۵ مهر ۱۴۰۵ خوانده شدند؛ یادداشت NI در مه ۲۰۲۴ به‌روز شده و نسخهٔ مستندات پایتون 3.14.8 از اجرا جداست.

۵. چهار پرسش با پاسخ کامل

آزمون مرز واحدها، ورودی صفر و مقاومت‌های مثبت با قطعات مجزا
تصویر مفهومی: آزمون مرز واحدها، ورودی صفر و مقاومت‌های مثبت با قطعات مجزا؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

پرسش اول: چرا ابزار ده‌هزاراهمی خروجی را چهار ولت می‌کند؟ پاسخ: با مقاومت پایینیِ ده‌هزار موازی و معادل پنج‌هزار می‌شود؛ نسبت پنج‌هزار به پانزده‌هزار، یک‌سوم است و از دوازده ولت، چهار ولت می‌دهد.

پرسش دوم: یک‌سوم کاهش یعنی ۰٫۳۳۳ درصد؟ پاسخ: خیر؛ کسر یک‌سوم برای نمایش درصد در صد ضرب می‌شود، یعنی حدود ۳۳٫۳۳ درصد. برچسب ستون گزارش باید این تفاوت را حفظ کند.

پرسش سوم: با Vin صفر، خطای نسبی ولتاژ صفر است؟ پاسخ: نسبتِ صفر به صفر تعریف نشده است و None می‌گیریم. اختلاف مطلق صفر است و کاهش نسبیِ بهره هنوز از نسبت مقاومت‌ها تعریف می‌شود.

پرسش چهارم: آزمونِ موفق، اندازه‌گیری واقعی را تأیید می‌کند؟ پاسخ: خیر؛ فقط محاسبهٔ مدل ایدئال و قرارداد معیار پذیرش سنجیده شده است. امپدانس وابسته به فرکانس، خطای ابزار، حفاظت و شرایط فیزیکی نیازمند بررسی جدا هستند.

منابع و مطالعهٔ بیشتر

بررسی منابع: ۲۵ مهر ۱۴۰۵. تحلیل‌ها و پیشنهادهای اجرایی، جمع‌بندی نویسنده‌اند.