agentsclimarketplace

Run2 scala numeric precision

Skill cxcscmu/SkillLearnBench/skills/b2-self-feedback-gemini-3-flash-preview/python-scala-translation/run2_scala-numeric-precision

Enhanced numeric tokenization with BigDecimal and precision in Scala.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_scala-numeric-precision

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

0.7 KB, 156 tokens by cl100k_base, as published. Nobody here has run it

Numeric Precision in Scala

Scala BigDecimal is robust for financial and precision calculations.

Formatting with Precision

def formatValue(value: Any, precision: Int): String = value match {
  case d: BigDecimal => s"%.${precision}f".format(d)
  case d: Double => s"%.${precision}f".format(d)
  case d: Float => s"%.${precision}f".format(d)
  case bi: BigInt => bi.toString
  case _ => value.toString
}

Scala Math Features

  • BigDecimal(str) or BigDecimal(double)
  • Precision can be set using math.BigDecimal.RoundingMode if necessary.
  • In the tokenizer context, string formatting is usually sufficient.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.