---
agentTools:
  projectIndex: https://xrpl-hooks.readme.io/llms.txt
---

# float_divide

Divide an XFL by another XFL floating point number

[block:api-header]
{
  "title": "Concepts"
}
[/block]

* [Floating Point Numbers (XFL)](https://xrpl-hooks.readme.io/docs/floating-point-numbers-xfl)

[block:api-header]
{
  "title": "Behaviour"
}
[/block]

* Divide an XFL by another XFL
* Return a new XFL as an int64\_t

[block:api-header]
{
  "title": "Definition"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "int64_t float_divide (\n    int64_t float1,\n    int64_t float2\n);",
      "language": "c"
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "Example"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "int64_t still_one =\n    float_divide(float_one(), float_one());",
      "language": "c"
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "Parameters"
}
[/block]

[block:parameters]
{
  "data": {
    "h-0": "Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "float1",
    "0-1": "int64_t",
    "0-2": "An XFL floating point enclosing number to act as numerator",
    "1-0": "float2",
    "1-1": "int64_t",
    "1-2": "An XFL floating point enclosing number to act as denominator"
  },
  "cols": 3,
  "rows": 2
}
[/block]

[block:api-header]
{
  "title": "Return Code"
}
[/block]

[block:parameters]
{
  "data": {
    "h-0": "Type",
    "h-1": "Description",
    "0-0": "int64_t",
    "0-1": "The XFL (xls17) enclosing number\n\nIf negative, an error:\n`INVALID_FLOAT`\n- the supplied parameter was not a valid XFL enclosing number or the division resulted in an XFL that cannot be represented.\n\n`DIVISION_BY_ZERO`\n- the supplied parameter was zero."
  },
  "cols": 2,
  "rows": 1
}
[/block]