## advanced_compute()


Perform advanced computation on data using the specified method.


Usage


``` python
advanced_compute(
    data,
    method="fast",
)
```


Applies a configurable analysis pipeline to the input data, returning detailed results including computed values, diagnostics, and metadata. Uses [helper()](helper.md#gdtest_docstring_combo.helper) internally for element-wise transformations.

> **Note: Added in version 3.0**


## Parameters


`data: list`  
A list of numeric values to process. Must contain at least one element.

`method: str = ``"fast"`  
The computation method. One of `"fast"` or `"precise"`. The `"fast"` method uses approximate algorithms while `"precise"` uses exact arithmetic at the cost of speed. Defaults to `"fast"`.


## Returns


`dict`  
A dictionary with the following keys:

- `"result"` -- the computed aggregate value (float).
- `"transformed"` -- element-wise transformed data (list).
- `"method"` -- the method that was used (str).
- `"n"` -- the number of data points processed (int).


## Raises


`ValueError`  
If `data` is empty or `method` is not recognized.

`TypeError`  
If `data` contains non-numeric values.

`OverflowError`  
If intermediate computations exceed float range.


## Notes

The `"fast"` method computes an approximate result using the following formula:

.. math::

    R = \frac{1}{n} \sum_{i=1}^{n} h(x_i)

where :math:`h` is the [helper()](helper.md#gdtest_docstring_combo.helper) transformation and :math:`n` is the number of data points.

The `"precise"` method uses compensated summation (Kahan algorithm) to minimize floating-point rounding errors. This is especially important when data values span many orders of magnitude.

The overall time complexity is `O(n)` for both methods, but the `"precise"` method has approximately 4x the constant factor due to the compensation arithmetic.


## Warnings

The `"fast"` method may produce results with relative error up to 1e-10 for datasets with high dynamic range.


## See Also

[helper()](helper.md#gdtest_docstring_combo.helper)  
Element-wise transformation used internally.


## References

1.  <span style="font-weight: 600; color: #6c757d;">\[1\]</span> Kahan, W. (1965). "Further remarks on reducing truncation errors." Communications of the ACM, 8(1), 40.
2.  <span style="font-weight: 600; color: #6c757d;">\[2\]</span> Higham, N.J. (2002). "Accuracy and Stability of Numerical Algorithms", 2nd edition, SIAM.


## Examples

Basic usage with the default fast method:

``` python
>>> result = advanced_compute([1.0, 2.0, 3.0])
>>> result["method"]
```

'fast'

``` python
>>> result["n"]
```

3

Using the precise method:

``` python
>>> result = advanced_compute([1.0, 2.0], method="precise")
>>> result["method"]
```

'precise'

The transformed values are computed via [helper()](helper.md#gdtest_docstring_combo.helper):

``` python
>>> result = advanced_compute([4.0])
>>> result["transformed"]
```

\[2.0\]
