Earnings per share - Summary of Earnings Per Share (Parenthetical) (Detail) - Dilutive potential shares from stock options [Member] - $ / shares |
3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
Apr. 30, 2026 |
Apr. 30, 2025 |
Apr. 30, 2026 |
Apr. 30, 2025 |
|
| Earnings per share [line items] | ||||
| Outstanding options excluded from calculation of diluted earnings per share | 0 | 917,151 | 583,179 | 684,687 |
| Average exercise price | $ 177.97 | $ 230 | $ 177.97 | |