code: def _cubicmin(a, fa, fpa, b, fb, c, fc):
      dtype = jnp.result_type(a, fa, fpa, b, fb, c, fc)
      C = fpa
      db = b - a
      dc = c - a
      denom = (db * dc) ** 2 * (db - dc)
      d1 = jnp.array(
          [[dc**2, -(db**2)], [-(dc**3), db**3]], dtype=dtype
      )
      d2 = jnp.array([fb - fa - C * db, fc - fa - C * dc], dtype=dtype)
      A, B = _dot(d1, d2) / denom
  
      radical = B * B - 3.0 * A * C
      xmin = a + (-B + jnp.sqrt(radical)) / (3.0 * A)
  
      return xmin
  
file_path: jax/jax/_src/scipy/optimize/line_search.py
imports: from __future__ import annotations
  from typing import NamedTuple
  from functools import partial
  from jax._src.numpy.util import promote_dtypes_inexact
  import jax.numpy
  import jax
  from jax import lax
label_desc: Use image node_id 1 for calling a global function with example usage: _cubicmin(a, fa, fpa, b, fb, c, fc) and returns: xmin