test_that("p_scale function works correctly", { expect_equal(p_scale(2), sqrt(2)) expect_true(is.finite(p_scale(1))) expect_error(p_scale(-1)) })