+ int grace_num = 0;
+ if (gn != SCM_UNDEFINED)
+ {
+ SCM_ASSERT_TYPE (SCM_INUMP (gn), gn, SCM_ARG3, __FUNCTION__, "integer");
+ grace_num = gh_scm2int (gn);
+ }
+
+ int grace_den = 1;
+ if (gd != SCM_UNDEFINED)
+ {
+ SCM_ASSERT_TYPE (SCM_INUMP (gd), gd, SCM_ARG4, __FUNCTION__, "integer");
+ grace_den = gh_scm2int (gd);
+ }
+
+ return Moment (Rational (gh_scm2int (n), gh_scm2int (d)),
+ Rational (grace_num, grace_den)).smobbed_copy ();