<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.23.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>161</ContextCount>
  <ElementCount>267</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>45</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Statement - Consolidated Statement of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ConsolidatedStatementofIncome</Role>
      <ShortName>Consolidated Statement of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - Condensed Consolidated Statement of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/CondensedConsolidatedStatementofComprehensiveIncome</Role>
      <ShortName>Condensed Consolidated Statement of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - Consolidated Balance Sheet</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ConsolidatedBalanceSheet</Role>
      <ShortName>Consolidated Balance Sheet</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - Consolidated Statement of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ConsolidatedStatementofStockholdersEquity</Role>
      <ShortName>Consolidated Statement of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - Consolidated Statement of Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ConsolidatedStatementofStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statement of Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - Condensed Consolidated Statement of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/CondensedConsolidatedStatementofCashFlows</Role>
      <ShortName>Condensed Consolidated Statement of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Disclosure - Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/BasisofPresentation</Role>
      <ShortName>Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Disclosure - Revenues</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/Revenues</Role>
      <ShortName>Revenues</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/EarningsPerShare</Role>
      <ShortName>Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Hedging Activities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/HedgingActivities</Role>
      <ShortName>Hedging Activities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Inventories, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/Inventoriesnet</Role>
      <ShortName>Inventories, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/Acquisitions</Role>
      <ShortName>Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Goodwill</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/Goodwill</Role>
      <ShortName>Goodwill</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Share-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ShareBasedCompensation</Role>
      <ShortName>Share-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - Retirement and Pension Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RetirementandPensionPlans</Role>
      <ShortName>Retirement and Pension Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - Disclosure - Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/Contingencies</Role>
      <ShortName>Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>0000021 - Disclosure - Basis of Presentation (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/BasisofPresentationPolicies</Role>
      <ShortName>Basis of Presentation (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>0000022 - Disclosure - Revenues (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RevenuesTables</Role>
      <ShortName>Revenues (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/Revenues</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>0000023 - Disclosure - Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/EarningsPerShareTables</Role>
      <ShortName>Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/EarningsPerShare</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>0000024 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/FairValueMeasurements</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>0000025 - Disclosure - Inventories, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/InventoriesnetTables</Role>
      <ShortName>Inventories, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/Inventoriesnet</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>0000026 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/Leases</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>0000027 - Disclosure - Acquisitions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/AcquisitionsTables</Role>
      <ShortName>Acquisitions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/Acquisitions</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>0000028 - Disclosure - Goodwill (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/GoodwillTables</Role>
      <ShortName>Goodwill (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/Goodwill</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>0000029 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/IncomeTaxes</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>0000030 - Disclosure - Share-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ShareBasedCompensationTables</Role>
      <ShortName>Share-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/ShareBasedCompensation</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>0000031 - Disclosure - Retirement and Pension Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RetirementandPensionPlansTables</Role>
      <ShortName>Retirement and Pension Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.amtexinc.com/role/RetirementandPensionPlans</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>0000032 - Disclosure - Revenues - Outstanding Contract Asset and (Liability) Accounts (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RevenuesOutstandingContractAssetandLiabilityAccountsDetail</Role>
      <ShortName>Revenues - Outstanding Contract Asset and (Liability) Accounts (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>0000033 - Disclosure - Revenues - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RevenuesAdditionalInformationDetail</Role>
      <ShortName>Revenues - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>0000034 - Disclosure - Revenues - Information About Operations in Different Geographic Areas (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RevenuesInformationAboutOperationsinDifferentGeographicAreasDetail</Role>
      <ShortName>Revenues - Information About Operations in Different Geographic Areas (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>0000035 - Disclosure - Revenues - Major Products and Services in Reportable Segments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RevenuesMajorProductsandServicesinReportableSegmentsDetail</Role>
      <ShortName>Revenues - Major Products and Services in Reportable Segments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>0000036 - Disclosure - Revenues - Timing of Revenue Recognition (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RevenuesTimingofRevenueRecognitionDetail</Role>
      <ShortName>Revenues - Timing of Revenue Recognition (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>0000037 - Disclosure - Revenues - Changes in Accrued Product Warranty Obligation (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RevenuesChangesinAccruedProductWarrantyObligationDetail</Role>
      <ShortName>Revenues - Changes in Accrued Product Warranty Obligation (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>0000038 - Disclosure - Earnings Per Share - Number of Weighted Average Shares (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/EarningsPerShareNumberofWeightedAverageSharesDetail</Role>
      <ShortName>Earnings Per Share - Number of Weighted Average Shares (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>0000039 - Disclosure - Fair Value Measurements - Fair Value of Assets Measured on Recurring Basis (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/FairValueMeasurementsFairValueofAssetsMeasuredonRecurringBasisDetail</Role>
      <ShortName>Fair Value Measurements - Fair Value of Assets Measured on Recurring Basis (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>0000040 - Disclosure - Fair Value Measurements - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/FairValueMeasurementsAdditionalInformationDetail</Role>
      <ShortName>Fair Value Measurements - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>0000041 - Disclosure - Fair Value Measurements - Fair Value Disclosures of Financial Instrument Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/FairValueMeasurementsFairValueDisclosuresofFinancialInstrumentLiabilitiesDetail</Role>
      <ShortName>Fair Value Measurements - Fair Value Disclosures of Financial Instrument Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>0000042 - Disclosure - Hedging Activities - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/HedgingActivitiesAdditionalInformationDetail</Role>
      <ShortName>Hedging Activities - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>0000043 - Disclosure - Inventories, net - Inventories (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/InventoriesnetInventoriesDetail</Role>
      <ShortName>Inventories, net - Inventories (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>0000044 - Disclosure - Leases - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/LeasesAdditionalInformationDetails</Role>
      <ShortName>Leases - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>0000045 - Disclosure - Leases- Components of Lease Expense (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/LeasesComponentsofLeaseExpenseDetail</Role>
      <ShortName>Leases- Components of Lease Expense (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>0000046 - Disclosure - Leases - Supplemental Balance Sheet Information Related to Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/LeasesSupplementalBalanceSheetInformationRelatedtoLeasesDetail</Role>
      <ShortName>Leases - Supplemental Balance Sheet Information Related to Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>0000047 - Disclosure - Leases - Maturities of lease liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/LeasesMaturitiesofleaseliabilitiesDetail</Role>
      <ShortName>Leases - Maturities of lease liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>0000048 - Disclosure - Acquisitions - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/AcquisitionsAdditionalInformationDetail</Role>
      <ShortName>Acquisitions - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>0000049 - Disclosure - Acquisitions - Allocation of Aggregate Purchase Price of Acquired Net Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/AcquisitionsAllocationofAggregatePurchasePriceofAcquiredNetAssetsDetail</Role>
      <ShortName>Acquisitions - Allocation of Aggregate Purchase Price of Acquired Net Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>0000050 - Disclosure - Goodwill - Changes in Carrying Amounts of Goodwill by Segment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/GoodwillChangesinCarryingAmountsofGoodwillbySegmentDetail</Role>
      <ShortName>Goodwill - Changes in Carrying Amounts of Goodwill by Segment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>0000051 - Disclosure - Income Taxes - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/IncomeTaxesAdditionalInformationDetail</Role>
      <ShortName>Income Taxes - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>0000052 - Disclosure - Income Taxes - Reconciliation of Liability for Uncertain Tax Positions (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/IncomeTaxesReconciliationofLiabilityforUncertainTaxPositionsDetail</Role>
      <ShortName>Income Taxes - Reconciliation of Liability for Uncertain Tax Positions (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>0000053 - Disclosure - Share-Based Compensation - Total Share-Based Compensation Expense (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ShareBasedCompensationTotalShareBasedCompensationExpenseDetail</Role>
      <ShortName>Share-Based Compensation - Total Share-Based Compensation Expense (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>0000054 - Disclosure - Share-Based Compensation - Weighted Average Assumptions Used for Estimating Fair Values of Stock Options Granted (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ShareBasedCompensationWeightedAverageAssumptionsUsedforEstimatingFairValuesofStockOptionsGrantedDetail</Role>
      <ShortName>Share-Based Compensation - Weighted Average Assumptions Used for Estimating Fair Values of Stock Options Granted (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>0000055 - Disclosure - Share-Based Compensation - Summary of Stock Option Activity and Related Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ShareBasedCompensationSummaryofStockOptionActivityandRelatedInformationDetail</Role>
      <ShortName>Share-Based Compensation - Summary of Stock Option Activity and Related Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>0000056 - Disclosure - Share-Based Compensation - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ShareBasedCompensationAdditionalInformationDetail</Role>
      <ShortName>Share-Based Compensation - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>0000057 - Disclosure - Share-Based Compensation - Summary of Nonvested Restricted Stock Activity and Related Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ShareBasedCompensationSummaryofNonvestedRestrictedStockActivityandRelatedInformationDetail</Role>
      <ShortName>Share-Based Compensation - Summary of Nonvested Restricted Stock Activity and Related Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>0000058 - Disclosure - Retirement and Pension Plans - Components of Net Periodic Pension Benefit Expense (Income) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RetirementandPensionPlansComponentsofNetPeriodicPensionBenefitExpenseIncomeDetail</Role>
      <ShortName>Retirement and Pension Plans - Components of Net Periodic Pension Benefit Expense (Income) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>0000059 - Disclosure - Retirement and Pension Plans - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/RetirementandPensionPlansAdditionalInformationDetail</Role>
      <ShortName>Retirement and Pension Plans - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="ame-20230331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>0000060 - Disclosure - Contingencies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.amtexinc.com/role/ContingenciesAdditionalInformationDetail</Role>
      <ShortName>Contingencies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 3 fact(s) appearing in ix:hidden were eligible for transformation: us-gaap:RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1 -  ame-20230331.htm 4</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-Q" original="ame-20230331.htm">ame-20230331.htm</File>
    <File>ame-20230331.xsd</File>
    <File>ame-20230331_cal.xml</File>
    <File>ame-20230331_def.xml</File>
    <File>ame-20230331_lab.xml</File>
    <File>ame-20230331_pre.xml</File>
    <File>ame-20230331xexx311.htm</File>
    <File>ame-20230331xexx312.htm</File>
    <File>ame-20230331xexx321.htm</File>
    <File>ame-20230331xexx322.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="542">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
